- Newest
- Most votes
- Most comments
To delete files from an S3 Glacier bucket, especially for data that hasn't been used since 2012, you need to be cautious to avoid unexpected costs. Here's a simplified approach:
-
Minimum storage duration: S3 Glacier Deep Archive has a minimum storage duration of 180 days. Since your files are from 2012, they've well exceeded this period, so you can delete them without incurring early deletion fees.
-
Use S3 Lifecycle rules: Instead of manually deleting files or using the CLI, the easiest and most efficient way to delete old Glacier objects is to set up a lifecycle rule in your S3 bucket. This is especially useful for non-technical users.
To set up a lifecycle rule:
- Go to the S3 console
- Select your bucket
- Go to the "Management" tab
- Click on "Create lifecycle rule"
- Set up a rule to expire (delete) objects based on their age
For your case, you can set the rule to delete objects that are older than, say, 10 years (since your files are from 2012).
-
Wait for the deletion process: After setting up the lifecycle rule, it may take up to 24 hours for Amazon S3 to apply the changes. The deletion process for a large number of objects can take some time.
-
Verify deletion: After the lifecycle rule has had time to run, check your bucket to ensure the objects have been deleted.
-
Delete the bucket: Once all objects are deleted, you can delete the empty bucket from the S3 console.
This approach avoids the need for technical CLI knowledge and provides a safe, automated way to delete your old Glacier data. Remember, while delete operations themselves are free, always double-check your settings to avoid unexpected costs.
Sources
Understanding S3 / Glacier Deep and is it safe to delete | AWS re:Post
Delete Billions of objects from S3 Bucket | AWS re:Post
Permanently delete from Glacier Deep Archive | AWS re:Post
To add to the previous answer and your comment, you can follow this YouTube video - https://youtu.be/c5PKWc_n2Kc?si=QcE_zj02VqJPvNDo&t=234 - from AWS to create lifecycle policy.
Relevant content
- asked 6 years ago
- asked 3 months ago
- asked 10 months ago
- AWS OFFICIALUpdated 3 years ago
Thank you very much! I am going to give it a try right now.
When I select the bucket I don't see a "management" tab Create lifecycle rule. Any ideas?