C2_W2_Lab_1

When trying to create the S3 buckets for the lab, it seems the user doesn’t have the permissions to create the resources:

An error occurred: An error occurred (AccessDenied) when calling the CreateBucket operation: User: arn:aws:sts::862062708339:assumed-role/voclabs/user3998935=qlpdppzbsvrw is not authorized to perform: s3:CreateBucket on resource: “arn:aws:s3:::USA” because no identity-based policy allows the s3:CreateBucket action
An error occurred: An error occurred (AccessDenied) when calling the CreateBucket operation: User: arn:aws:sts::862062708339:assumed-role/voclabs/user3998935=qlpdppzbsvrw is not authorized to perform: s3:CreateBucket on resource: “arn:aws:s3:::International” because no identity-based policy allows the s3:CreateBucket action

Could you assist me so I can continue with the lab?

Thanks!

Hello @rodrigo_alvez,

I noticed in your error your used the resource is arn:aws:s3:::International instead.I could reproduce the issue and it means you didn’t use the provided script names . You should create the two buckets with the correct names:

International: arn:aws:s3:::de-c2w2lab1-[ACOUNT ID]-int
USA: arn:aws:s3:::de-c2w2lab1–[ACOUNT ID]-usa

You used:
USA_BUCKET = 'USA
INTERNATIONAL_BUCKET= 'International'

instead of the correct bucket names:
USA_BUCKET = f'de-c2w2lab1-{ACCOUNT_ID}-usa'
INTERNATIONAL_BUCKET =f'de-c2w2lab1-{ACCOUNT_ID}-int'

Since is a practice lab you can follow the solutions to fix your code. Thank you