how to get System controlled x-amz-meta-file-ctime for an s3 object

0

I'm trying to get some timing how log it takes files to be uploaded an s3 bucket and would like to retrieve the x-amz-meta-file-ctime and last modified date, so I can determine how long it took for the file to be uploaded. I'm assuming the creation date is not the same, which it appears that they are not. When I tried to access the metadata using list_objects_v2 or head_object, the metadata is always empty, even though when I check the files on console I can see the metadata. Is there a boto3 method I can use to get the system controlled metadata?

asked 7 months ago275 views
1 Answer
0
Accepted Answer

I figured it out. I had to add Cross-origin resource sharing (CORS) to the s3 bucket I was interested in. Needed to set the ExposeHeaders for the fields I was interested.

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions