Does aws-cli confirm checksums when uploading files to S3, or do I need to manage that myself?

后端 未结 2 1510
萌比男神i
萌比男神i 2021-02-20 11:20

If I\'m uploading data to S3 using the aws-cli (i.e. using aws s3 cp), does aws-cli do any work to confirm that the resulting file in S3 matches the original file,

2条回答
  •  一向
    一向 (楼主)
    2021-02-20 12:08

    According to the faq from the aws-cli github, the checksums are checked in most cases during upload and download.

    Key points for uploads:

    • The AWS CLI calculates the Content-MD5 header for both standard and multipart uploads.
    • If the checksum that S3 calculates does not match the Content-MD5 provided, S3 will not store the object and instead will return an error message back the AWS CLI.
    • The AWS CLI will retry this error up to 5 times before giving up and exiting with a nonzero exit code.

提交回复
热议问题