Save costs on your versioning-enabled S3 bucket!

Abhishek Rai - Aug 7 - - Dev Community

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.

.
Terabox Video Player