Does user-defined object meta data can be made part of CSV file which is generated from S3 Inventory Management ?

0

I am having S3 bucket with version enabled, and while storing objects in S3 bucket I am setting some user-defined header attributes. for example x-version which is at AWS side stored as x-amz-meta-x-version under Metadata section. Now I am looking for option where this data can be get stored in CSV file which is generated from S3 inventory I have configured for this bucket. Certainly at time of creating S3 inventory configuration I dont find to select user-defined attributes. any workaround for this option ? I have gone through several pages of documentation and so far no option with which I can achieve this output.

demandé il y a un mois472 vues
1 réponse
0

Hello,

I understand that you are looking to confirm if S3 inventory supports custom metadata and any other workaround to get the metadata.

Currently, the metadata for tag associated to S3 objects is not available in S3 inventory report and the only metadata available are the ones listed in link below and S3 inventory currently does not support custom metadata. I have raised a Feature Request with the S3 team about the issue.

To get the metadata of all the objects in your bucket, I will suggest you use programmatic ways such as AWS CLI scripting or AWS SDKs. I will suggest you use AWS CLI [1],[2] for now. First note that there is no S3 API call to retrieve the metadata directly but you can check it through HeadObject API call. You have to loop through the list of the objects and do a HeadObject API call to get the metadata.

]$ aws s3api head-object --bucket XXXXX --key folder1/response322 { "AcceptRanges": "bytes", "ContentType": "binary/octet-stream", "LastModified": "Thu, XX May XXXX 09:53:34 GMT", "ContentLength": 2693, "ContentEncoding": "abcd", "VersionId": "null", "ETag": ""8d5d72855a068d6734e0af6d7fa9647c"", "Metadata": { "abc": "fefw" } }

[1] Installing the AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html [2] Configuring the AWS CLI - https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html [3] aws s3 ls - https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html [4] aws s3api head-object - https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html#head-object

AWS
INGÉNIEUR EN ASSISTANCE TECHNIQUE
répondu il y a 24 jours

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