#AWS SAM & AWS CLI : Can't Update S3 bucket. Stack fails at "UPDATE_ROLLBACK_COMPLETE"

6 messages · Page 1 of 1 (latest)

foggy sedge
#

What are you naming your bucket? Remember buckets need to be unique not just in your account but in all the accounts in a partition ( eg aws, aws-cn, aws-us-gov, etc) try naming the bucket the url you registered.

timber linden
#

I don't think it's a unique s3 bucket problem if I'm able to create the s3 bucket in my original post.

I tried creating a new bucket in the AWS console with my url I registered to make sure it's unique and it worked. I deleted it so i can attempt using it through AWS CLI.

My next steps were :

Adding the new s3bucket to my template.yaml below

Resources:
MyWebsite:
Type: AWS::S3::Bucket
Properties:
BucketName: uniqueS3bucket

sam build && aws-vault exec myuser --no-session -- sam deploy

Now I have a similar error but with a new ResourceStatusReason in AWS CLI which is in the spoiler below

foggy sedge
#

there is sometimes a period you need to wait between deleting a bucket, and that name being available to provision again. I wonder if that was part of your initial problem.

In this second error it looks like it it unable to make a bucket policy. by any chance did you change the name of your bucket, and are not applying the policy to THAT bucket? its hard to help you troubleshoot without seeing your SAM template.

foggy sedge
timber linden
#

I apologize for the confusion. I believe I posted the wrong terminal as I did have some bucketpolicy changes made that i did not refer to in my original post template.yaml. I am going to delete this message and start again before posting again. Thank you for the help!!

foggy sedge
#

As a general rule I suggest leaving up posts ESPECIALLY when it seems like a dumb mistake. Post what your mistake was how you fixed it and leave it to help the countless others that will make the same error.