1 Answer
- Newest
- Most votes
- Most comments
1
Hello Josh,
There are two ways to accomplish what you are trying to do.
When you use AWS CLI for interacting with S3, some commands only work on single object / file unless the --recursive
flag is used. S3 rm
is one those commands. Please refer the documentation for more details.
Sample command will be: aws s3 rm s3://foo/bar --recursive
. This command will remove the directory bar
and anything inside it in the bucket foo
You can also accomplish this via the GUI. Note: This will delete the bucket altogether. If you want to delete a specific directory and everything inside it, you need to use the CLI command I listed above.
- Navigate to the S3 console.
- Select the bucket that you want to delete
- Click on the
Empty
button to empty the bucket - Once the bucket is empty, you can click on Delete button to delete it
answered 8 months ago
Relevant content
- asked 2 years ago
- asked 7 days ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 4 years ago
Hi, I personally use CLI with --recursive option to do this