How to delete a folder in AWS s3

0 votes
How do I delete a bucket from an s3 bucket using aws cli? What is the command?
Aug 23, 2019 in AWS by Harsha
66,980 views

Check this out https://www.youtube.com/watch?v=XjPUyGKRjZs

This might help!

2 answers to this question.

+1 vote

Use the following CLI command to delete a folder from an S3 bucket:

$ aws s3 rm s3://bucket/folder --recursive

--recursive is useful when you need to delete all the subfolders as well.

For further understanding, refer to the AWS Course

answered Aug 23, 2019 by Parth
Not so useful if you have hundred of thousands of items. This could take hours...
Yes, I agree, it's very time-consuming!
+1 vote

There is a delete-folder option, but you need to know the folder-id:
https://docs.aws.amazon.com/cli/latest/reference/workdocs/delete-folder.html

answered Oct 3, 2019 by Shai
How do I find my folder-id?

Related Questions In AWS

0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14, 2019 in AWS by athenauserz
12,081 views
0 votes
1 answer

How to download the latest file in a S3 bucket using AWS CLI?

You can use the below command $ aws ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,170 points
20,083 views
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,020 points
6,234 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,020 points
5,390 views
0 votes
1 answer

Import my AWS credentials using python script

Using AWS Cli  Configure your IAM user then ...READ MORE

answered Nov 16, 2018 in AWS by Jino
• 5,820 points
2,990 views
0 votes
2 answers
0 votes
1 answer

What are branches in AWS CodeCommit and how to create one?

To create branches, click on Branches on ...READ MORE

answered Jun 13, 2019 in AWS by Trisha
1,424 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP