Fetching user defined object metadata in ListObjectsV2 or one request

0

I have objects uploaded to S3 with user defined object metadata: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#UserMetadata I want to get a list of all the object key names along with their custom metadata given a key prefix. I am using ListObjectsV2 command with the given prefix to first get all the object keys and then making a request to HeadObject given the specific key to get the user defined object metadata.

Is there a way to get the user defined object metadata with only one request given key prefix and bucket name?

Additional notes: I am using the Javascript SDK. I am able to get the user defined metadata on the object by making a request to https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListObjectsV2Command/ and then using the keys from the result, make the https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/HeadObjectCommand/ request to get the user defined metadata. I am looking for a way to do this in one request instead because ListObjectsV2Command is returning some metadata already like LastModified, Size, StorageClass and ETag, just not user defined obj metadata

Bhargav
已提问 9 个月前95 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则