如何识别Amazon S3中的存储类别?

Exp*_*ple 5 amazon-s3 amazon-web-services

假设我的媒体资产存储在S3 Standard Storage中。30天后,它移到了S3标准非经常访问存储,90天后,它通过我配置的生命周期策略移到了Glacier。

因此,在任何时间点如何识别对象的存储位置?

Joh*_*ein 5

对象的存储类指示数据“存储”的位置。

对于StandardStandard-Infrequent Access (Standard-IA),对象在 Amazon S3 中保持正常。

对于Glacier,对象仍在 Amazon S3 中(包括名称、大小、元数据等),但对象的内容存储在 Glacier 中。

存储类可以通过管理控制台、API 调用或AWS 命令​​行界面 (CLI) 确定,例如:

$ 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
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

看: