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