ExploringApple
ExploringApple

Reputation: 1484

How to identify the storage class in Amazon S3?

Suppose I have media assets stored in S3 Standard Storage. After 30 days it moved to S3 Standard-Infrequent Access Storage and after 90 days it is moved to Glacier by lifecycle policies that I configured.

So at any point of time how can I identify where the object is stored?

Upvotes: 11

Views: 14457

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269410

The Storage Class of an object indicates where the data is "stored".

For Standard and Standard-Infrequent Access (Standard-IA), the object is kept as normal in Amazon S3.

For Glacier, the object is still listed within Amazon S3 (including name, size, metadata, etc) but the content of the object is stored in Glacier.

The storage class can be determined via the Management Console, API call or AWS Command-Line Interface (CLI), eg:

$ aws s3api list-objects --bucket my-bucket

 {
    "Contents": [
        {
            "LastModified": "2014-06-19T00:30:49.000Z", 
            "ETag": "\"c963435563f7e3e6b143b50ff9c68168\"", 
            "StorageClass": "GLACIER", 
            "Key": "foo.jpg", 
            "Owner": {
                "DisplayName": "fred", 
                "ID": "1de5d80077bd70578d092d9b450b0c916c2c79d1d2b550e5a99a4d21ddb1ab1a"
            }, 
            "Size": 15091
        }
    ]
}

See:

Upvotes: 9

Related Questions