$ aws s3 ls s3://web.nullpo.io $ aws s3 cp contents/index.html s3://web.nullpo.io/ upload: contents/index.html to s3://web.nullpo.io/index.html $ aws s3 cp contents/error.html s3://web.nullpo.io/ upload: contents/error.html to s3://web.nullpo.io/error.html $ aws s3 ls s3://web.nullpo.io 2020-05-01 22:38:45 79 error.html 2020-05-01 22:38:37 79 index.html
S3バケットにコンテンツがあるとスタック削除で削除エラーになる
スタックの削除でStackStatusReason: The following resource(s) failed to delete: [S3BucketContents]のエラーとなる。 イベントでみるとThe bucket you tried to delete is not empty (Service: Amazon S3; Status Code: 409; Error Code: BucketNotEmpty;でバケットが空でないため削除できない。
$ aws s3 rb s3://web.nullpo.io/ remove_bucket failed: s3://web.nullpo.io/ An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty $ aws s3 rb s3://web.nullpo.io/ --force delete: s3://web.nullpo.io/index.html delete: s3://web.nullpo.io/error.html remove_bucket: web.nullpo.io