Open garysassano opened 2 months ago
This is a very frustrating user experience - i know from experience when CloudFormation is taking a long time with the bucket policy that there is some issue with the principal or resources. Quite why it takes so long to inform you is a mystery.
Name of the resource
AWS::S3::BucketPolicy
Resource Name
No response
Issue Description
I wrote the following code in AWS CDK:
It's the same as creating a new S3 bucket with the following policy statement:
Expected Behavior
I assumed CloudFormation would promptly return an error, stating that the principal is invalid when trying to add the S3 policy statement.
In essence, I expected CloudFormation to behave just like the S3 AWS Console, returning an error like this:
Observed Behavior
Upon deployment, CloudFormation hanged for 20 minutes on the creation of the S3 bucket policy:
Eventually, the stack got rolled back:
Test Cases
CloudFormation should make an API call to test if the principal exists and immediately return.
Other Details
No response