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

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠