16

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

kevin peter
  • 541
  • 1
  • 4
  • 19

2 Answers2

17

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".

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
13

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.

enter image description here

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
kevin peter
  • 541
  • 1
  • 4
  • 19
  • 7
    Be sure you understand all of the implications of `STANDARD_IA` before using it. Every object has a minimum billable size of 128K and a minimum billable duration of 30 days. If an object is smaller or deleted sooner, you will still be charged the minimums. Lifecycle Policies are often the preferred solution. – Michael - sqlbot Sep 08 '17 at 11:43
  • 1
    yeah I'm aware of that. – kevin peter Sep 08 '17 at 12:01