aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

CREATE_FAILED | AWS::S3::BucketPolicy | (Service: S3, Status Code: 403)

Open hellofadude opened this issue 3 months ago • 0 comments

Describe the bug

Static-site-stack - Python

If you are using an identity other than the root user (i.e. user with administrative credentials in Identity center per best practice) of the AWS account that owns the bucket, the calling identity must have the PutBucketPolicy permissions on the specified bucket and belong to the bucket owner's account in order to use this operation.

If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access Denied error

Expected Behavior

stack deploys correctly

Current Behavior

stack fails creation

Reproduction Steps

cdk deploy

Possible Solution

Add a s3:PutBucketPolicy action to the PolicyStatement

Additional Information/Context

No response

CDK CLI Version

2.139.0 (build 2699ffd)

Framework Version

No response

Node.js Version

v20.0.0

OS

Ubuntu 22.04.4 LTS

Language

Python

Language Version

3.10.12

hellofadude avatar Apr 29 '24 23:04 hellofadude