aws

Save costs on your versioning-enabled S3 bucket!

arai

Abhishek Rai

Posted on August 7, 2024

Save costs on your versioning-enabled S3 bucket!

Just enable lifecycle policies in your versioning enabled bucket which expires Non Current Versions after 7 days.

Read this document - link

{
  "Rules": [
    {
      "ID": "ExpireNonCurrentVersionsAfter7Days",
      "Status": "Enabled",
      "Filter": {
        "Prefix": ""
      },
      "NoncurrentVersionExpiration": {
        "NoncurrentDays": 7
      }
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

That's it. Keeping it short. You can add filter conditions in case you want to keep the deletion radius smaller.

💖 💪 🙅 🚩
arai
Abhishek Rai

Posted on August 7, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related