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?

posta 8 mesi fa291 visualizzazioni
1 Risposta
0
Risposta accettata

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.

con risposta 8 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande