Created
October 16, 2018 22:54
-
-
Save darrenrogan/0e322a8e131c3144895f6c5927ea5791 to your computer and use it in GitHub Desktop.
AWS CLI to remove delete markers (to enable the deletion of the S3 bucket)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3api delete-objects --bucket bucket-name --delete "$(aws s3api list-object-versions --bucket "bucket_name" --output=json --query='{Objects: DeleteMarkers[].{Key:Key,VersionId:VersionId}}')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aws s3 rm s3://bucket-name --recursive