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?

demandé il y a 8 mois291 vues
1 réponse
0
Réponse acceptée

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.

répondu il y a 8 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions