首页 > 解决方案 > 使用 s3 中的元数据检索/列出对象 - aws sdk

问题描述

我已使用用户定义的元数据数据将文件存储在 S3 存储桶中。可以说我的元数据就像

metaData = {
    "title": "some random user title", 
    "description": "some random user description"
}

我知道我可以使用对象键和存储桶名称下载文件。我正在查看是否有任何方法/选项可以通过仅传递用于在 S3 中上传的对象的存储桶名称用户定义的元数据来获取/检索/列出文件。

以及了解用户定义元数据的实际使用情况

任何指导或建议都会非常有帮助。!

标签: amazon-web-servicesamazon-s3aws-sdk

解决方案


There is no native operation in Amazon S3 that can locate/retrieve objects via Metadata.

Metadata can be retrieved from objects, but cannot be used to search for objects. Also, only limited Metadata can be retrieved as part of an object listing.

An alternative would be to use Amazon S3 Inventory - Amazon Simple Storage Service. This only provides the listing once per day, but it can include metadata. You could use these files to locate objects based on metadata.

See:


推荐阅读