O'Reilly logo

Amazon S3 Cookbook by Naoya Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to apply the lifecycle policy through the S3 console

This section introduces the process of configuring lifecycle rules based on a couple of scenarios and how the rules work checking the storage class with AWS CLI.

Getting ready

You do not have to request permissions to configure the lifecycle policy over your bucket. All you need to do is:

  • Sign up on AWS and be able to access S3 with your IAM credentials
  • Enable server access logging for your bucket

How to do it…

To enable the lifecycle of objects, you need to create a lifecycle policy, specify where to apply the whole bucket (or a specific prefix) and the lifetime (in days). We will configure a lifecycle policy with the following parameters:

  • Apply the Rule to (Where): logs/
  • Permanently Delete (Lifetime): ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required