Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Default Storage Class on AWS S3

By default storage in a bucket is STANDARD. And while pushing each object we can change the storage.

But is there a way to change default storage at Bucket level ( probably through AWS Console) ?

like image 641
Deepak Singhal Avatar asked Nov 19 '13 05:11

Deepak Singhal


People also ask

What is the default storage class in Amazon S3?

S3 Standard — The default storage class. If you don't specify the storage class when you upload an object, Amazon S3 assigns the S3 Standard storage class.

How do I change my storage class?

In the Google Cloud console, go to the Cloud Storage Buckets page. In the bucket list, find the bucket you want to modify, and click its Bucket overflow menu ( ).

What is the default setting for S3 storage visibility?

By default, all Amazon S3 resources—buckets, objects, and related subresources (for example, lifecycle configuration and website configuration)—are private. Only the resource owner, the AWS account that created it, can access the resource.

How many storage classes are there in S3?

S3 has six storage classes puprose-built for varying access needs to help you optimize costs. With the S3 Storage Classes, S3 Storage Class Analysis, and S3 Lifecycle policies, you can enable storage cost efficiencies without impacting availability or performance.


2 Answers

It's technically true that you cannot set the storage class on a per-bucket basis. However, you can specify a lifecycle policy on your bucket to automatically transition new objects to a storage class, as it says here.

The Standard - IA storage class is set at the object level and can exist in the same bucket as Standard, allowing you to use lifecycle policies to automatically transition objects between storage classes without any application changes.

To do this, go to the Management tab for a your bucket and click 'Add lifecycle rule' Add lifecycle rule

Give it a name and click next. For 'Configure transition', select current version. Click Add transition, choose "Transition to Standard-IA after" and choose 30, because 30 is the minimum. Finish your rule and you are all set.

enter image description here

like image 163
Sam Rueby Avatar answered Oct 11 '22 13:10

Sam Rueby


The storage class cannot be set on a per-bucket basis. It must be specified with each upload operation in your client.

like image 40
John Bachir Avatar answered Oct 11 '22 14:10

John Bachir