3
votes

I have the ff s3 bucket, see image below: enter image description here

I know how to delete them on the page but how can i delete them using aws cli?

I tried using

aws s3api delete-objects --bucket elasticbeanstalk-ap-southeast-1-613285248276

but it wont work.

2

2 Answers

10
votes

You can use 'rb' option

E.g. aws s3 rb s3://elasticbeanstalk-ap-southeast-1-613285248276

For more details click here

If the bucket is not empty then use the --force flag

1
votes

The following commands deletes the Bucket from S3

aws s3api delete-bucket --bucket "your-bucket-name" --region "your-region".