When you suffer from the “API: s3:PutBucketPolicy Access Denied” error while creating a new S3 bucket, how can we resolve it?
The user encountered an error when trying to create a new Amazon S3 bucket for hosting a website. The error message indicated an “Access Denied” issue with the `s3:PutBucketPolicy` API. To resolve this, the user needs to add the `blockPublicAccess` attribute with the value `BlockPublicAccess.BLOCK_ACLS` to the CDK project configuration. By doing so, the default configuration of Amazon S3 will be updated correctly. The user provided additional links as references for more information on this topic.