How do I move Amazon S3 objects to the Intelligent-Tiering storage class?

2 minute read
0

I want to move my Amazon Simple Storage Service (Amazon S3) objects to the Intelligent-Tiering storage class to optimize storage costs.

Resolution

To move Amazon S3 objects to the S3 Intelligent-Tiering storage class, you can either directly upload objects or use an S3 Lifecycle configuration rule.

Note:

Directly upload objects to S3 Intelligent-Tiering

AWS CLI

Run the following put-object command:

aws s3api put-object --bucket bucket_name --key dir-1/my_images.tar --body my_images.tar --storage-class INTELLIGENT_TIERING

Amazon S3 console

Complete the following steps:

  1. Open the Amazon S3 console, and then navigate to your bucket.
  2. Choose the S3 objects that you want to move, and then choose Upload.
  3. Expand Properties, and then in Storage class, choose Intelligent-Tiering.
  4. Choose Upload.

Create a S3 lifecycle rule to transition objects to S3 Intelligent Tiering

AWS CLI

Complete the following steps:

  1. Create and save the following JSON file as intelligent-tier.json:

    { 
           "Rules": [ 
              { "ID": "Intelligent_Tier_lifecycle",
                "Prefix": "",
                "Status": "Enabled",
                "Transitions": [ 
                   { "Days": 0,
                     "StorageClass": "INTELLIGENT_TIERING"
                    }
                ] 
            }
         ] 
       }
  2. Run the put-object command to create the lifecycle rule:

    aws s3api put-bucket-lifecycle-configuration --bucket bucket_name --lifecycle-configuration file://intelligent-tier.json
  3. Run the get-bucket-lifecycle-configuration command to verify that the rule is set on the bucket:

    aws s3api get-bucket-lifecycle-configuration --bucket bucket_name

Amazon S3 console

You can use the Amazon S3 console to configure S3 Lifecycle rules for noncurrent object versions. For more information, see How do I create Amazon S3 lifecycle configuration rules for noncurrent object versions?

To configure S3 Lifecycle rules for current object versions, see the Using the S3 console section in How to set an S3 Lifecycle configuration.

Note: If the storage class of your objects didn't change, then see Why didn't my Amazon S3 lifecycle rule transition objects into the Intelligent-Tiering storage class?

Related information

Manage Amazon S3 storage costs granularly and at scale using S3 Intelligent-Tiering

Getting started using Amazon S3 Intelligent-Tiering

S3 Intelligent-Tiering adds Archive Access tiers

AWS OFFICIAL
AWS OFFICIALUpdated a month ago