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?

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.

回答済み 7ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ