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?

已提问 8 个月前291 查看次数
1 回答
0
已接受的回答

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.

已回答 8 个月前

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

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

回答问题的准则