简体   繁体   中英

Change S3 Bucket Storage class to S3 Infrequent Access

I want to change the S3 bucket to have default storage class of Infrequent Access.

So if I upload file to the bucket, it should directly go to Infrequent Access storage.

I don't want to use the Lifecycle

There is no concept of a default storage class for an Amazon S3 bucket .

The storage class is specific to the object and can be specified when the object is created in the bucket.

You will need to change your upload process to specify the storage class at the time of object creation .

You can use the lifecycle rules to later change storage classes based upon the age of the object, which is as close as you'll get to a "default storage class".

I found the answer myself.

Using cli-

aws s3 cp glacier.png s3://my-lambada-example-thumbnails/ --storage-class STANDARD_IA

So by using --storage-class we could specify the storage class.

Also when uploading from AWS console we get to specify the storage class.

Those who are using AWS File Gateway and want to change Storage class from S3 standard to IA can change as shown below.

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM