- Newest
- Most votes
- Most comments
Hello,
I understand that you are looking to confirm if S3 inventory supports custom metadata and any other workaround to get the metadata.
Currently, the metadata for tag associated to S3 objects is not available in S3 inventory report and the only metadata available are the ones listed in link below and S3 inventory currently does not support custom metadata. I have raised a Feature Request with the S3 team about the issue.
To get the metadata of all the objects in your bucket, I will suggest you use programmatic ways such as AWS CLI scripting or AWS SDKs. I will suggest you use AWS CLI [1],[2] for now. First note that there is no S3 API call to retrieve the metadata directly but you can check it through HeadObject API call. You have to loop through the list of the objects and do a HeadObject API call to get the metadata.
]$ aws s3api head-object --bucket XXXXX --key folder1/response322 { "AcceptRanges": "bytes", "ContentType": "binary/octet-stream", "LastModified": "Thu, XX May XXXX 09:53:34 GMT", "ContentLength": 2693, "ContentEncoding": "abcd", "VersionId": "null", "ETag": ""8d5d72855a068d6734e0af6d7fa9647c"", "Metadata": { "abc": "fefw" } }
[1] Installing the AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html [2] Configuring the AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html [3] aws s3 ls - https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html [4] aws s3api head-object - https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html#head-object
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
Any possible solution for this case ?