送信ファイルをCSVに指定ロジック追加

This commit is contained in:
nik.n 2024-03-19 11:50:55 +09:00
parent 1bb28fc083
commit 6fd5ada477

View File

@ -83,7 +83,9 @@ def lambda_handler(event, context):
s3_client.copy_object(
Bucket=DATA_IMPORT_BUCKET,
Key=f'{ENCISE_TARGET_FOLDER}/{event_file_name}',
CopySource=copy_source
CopySource=copy_source,
ContentType='text/csv', # ファイルのタイプを指定する必要があるため、ContentTypeを指定する。
MetadataDirective='REPLACE' # ファイルのメタデータを置き換える必要があるため、MetadataDirectiveを指定する。
)
# コピー後、元のバケットからは削除する
s3_client.delete_object(Bucket=event_bucket_name, Key=event_object_key)