diff --git a/lambda/transfer-encise-data/transfer-encise-data.py b/lambda/transfer-encise-data/transfer-encise-data.py index bc58963c..5e09b7d3 100644 --- a/lambda/transfer-encise-data/transfer-encise-data.py +++ b/lambda/transfer-encise-data/transfer-encise-data.py @@ -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)