Skip to content

How to Recursively Delete all Files in an AWS S3 Bucket

If you need to recursively delete all files in an AWS S3 bucket, then you can do the following:

aws s3 rm --recursive s3://your-bucket-name/foo/bar/
Code language: Bash (bash)

If you only want to delete an specific object from AWS S3:

aws s3 rm s3://your-bucket-name/foo/bar/item.txt
Code language: Bash (bash)

See also  [Solved] Read timeout on endpoint URL: "https://lambda.[region].amazonaws.com/2015-03-31/functions/[function-name]/invocations"
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x