How to delete incomplete multipart uploads associated with a deleted S3 bucket?

0

There were thousands of failed multipart upload requests associated with a bucket. Instead of creating a lifecycle rule, I deleted the bucket hoping that it would also remove all the associated incomplete multipart requests immediately, but that didn't work. I recreated the bucket with the same name and added the incomplete multipart uploads rule to the bucket, but that also wasn't successful in reducing the S3 storage usage due to incomplete multipart uploads. Could you kindly guide me on what I can do now to fix this issue?

  • Storage lens values are reduced to reflect only current objects in that bucket after 2 days. However, CloudWatch metrics still display larger, incorrect values, including incomplete multipart values.

질문됨 일 년 전515회 조회
1개 답변
0

First you can list out the multipart uploads you have with the AWS CLI command: # aws s3api list-multipart-uploads --bucket <Bucketname>

From that you need to obtain the key and the upload id, that use that in a second command to abort the multipart upload so that the object parts are deleted.
# aws s3api abort-multipart-upload --bucket <Bucket Name> --endpoint-url=<Bucket URL> --key <Object Key> --upload-id <Upload ID>

If you have many multipart uploads, you might create a create a script.

CLI Command Reference: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html

profile pictureAWS
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
  • aws s3api list-multipart-uploads --bucket <Bucketname> gives response "None None"

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠