Search code examples
amazon-s3aws-java-sdk

Include S3 object user defined metadata in list reponse


Is there a way to get a S3 object user defined metadata by AmazonS3 listObjectsV2? The only way I see in order to fetch this metadata is after listObjectsV2 request make another getObjectMetadata or getObject request.


Solution

  • Is there a way to get a S3 object user defined metadata by AmazonS3 listObjectsV2?

    No, this piece of information is not included in the listObjectsV2 response.

    The only way I see in order to fetch this metadata is after listObjectsV2 request make another getObjectMetadata or getObject request.

    Yes, this is correct. The only way to get this is to make a separate getObjectMetadata request.