- Newest
- Most votes
- Most comments
There are a variety of options you can use to empty a bucket. They are listed here.
A really good option is to have lifecycle policies do the deletion (expiration) for you. See this link for setting up a lifecycle policy and this link specifically covers expiration. With this you can have the policy expire/delete any objects that are older than X. That should help you remove anything old. One thing to keep in mind is that there might be a delay between the expiration date and the date at which Amazon S3 removes an object. You are not charged for expiration or the storage time associated with an object that has expired.
Thank you, Paul! So far all my files are still there, so I just added a noncurrent rule to try that. I'll leave it over the weekend and hope to come back to an empty bucket next week. Thanks again.
Glad I could help!
Relevant content
- asked a year ago
- Accepted Answerasked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 7 months ago
I'll give this a try. I have a new rule set for current versions to expire after one day. That should do it, correct? Or do I need to do anything with noncurrent versions? (THANK YOU!!)
That should do it! If you have versioning turned on, you may also want to include the noncurrent versions. If you don't have it on, you should be covered. Keep in mind that once the object is deleted, it's gone forever!