How to write meta data in S3ExportTaskDefinition

0

Hi there,

I am trying to write meta data to a file and upload it to s3

here is what i have. I am not sure what is the correct format for the user_metadata

class MediaMeta(BaseModel):
        data:str

s3_export_task_definition = S3ExportTaskDefinition(input_url=self.src_file_path,
                                                           bucket=self.bucket_name,
                                                           key=self.key_to_file,
                                                           user_metadata=meta_data.dict())

thanks for your help

已提問 2 年前檢視次數 186 次
1 個回答
0
已接受的答案

Here is an example of adding meta data:

        s3_task = S3ExportTaskDefinition(
            input_url = self.src_file_path,
            bucket = "foo",
            key = "bar",
            user_metadata = {
                "key": "value",
                "foo": "bar"
            }
        )
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南