#AWS SAM & AWS CLI : Can't Update S3 bucket. Stack fails at "UPDATE_ROLLBACK_COMPLETE"
6 messages · Page 1 of 1 (latest)
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
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.
reusing buckets reference: https://docs.aws.amazon.com/AmazonS3/latest/userguide/BucketRestrictions.html
In addition, some time might pass before you can reuse the name of a deleted bucket.
Restrictions for using buckets in Amazon S3, including the number of buckets per account and bucket naming guidelines.
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!!
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.