【发布时间】:2020-06-19 03:22:07
【问题描述】:
我对 ETag 的理解是它应该对应 MD5 哈希,前提是你没有使用分段上传并且你没有使用 KMS 加密。
我刚开始依赖应用程序中的这个功能,发现这不成立。
我通过 cli 上传了一个较大的 powerpoint 文件 (110MB),而 ETag 不是 MD5 哈希。
使用完全相同的 cli 命令和更小的 powerpoint 文件,ETag 是 MD5 哈希。
通过控制台观察到相同的行为。 cli 和控制台是在后台使用分段上传还是我错过了什么?
jgreenal$ aws s3 cp bigpowerpoint.pptx s3://mybucketname --sse=AES256
jgreenal$ aws s3api head-object --bucket mybucketname --key bigpowerpoint.pptx
{
"AcceptRanges": "bytes",
"LastModified": "Fri, 06 Mar 2020 11:15:47 GMT",
"ContentLength": 113962008,
"ETag": "\"d15e9a175cd9365a6480eab9105c7c86-14\"",
"VersionId": "2JMq2pPyKMk3ZlSco4l.r5ZPip_pp6Oq",
"ContentType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"ServerSideEncryption": "AES256",
"Metadata": {},
"ReplicationStatus": "COMPLETED"
}
jgreenal$ aws s3 cp tinypowerpoint.pptx s3://mybucketname --sse=AES256
jgreenal$ aws s3api head-object --bucket mybucketname --key tinypowerpoint.pptx
{
"AcceptRanges": "bytes",
"LastModified": "Fri, 06 Mar 2020 11:20:37 GMT",
"ContentLength": 33878,
"ETag": "\"7a0b3c27805d5f599e5d655b13b4644c\"",
"VersionId": "Tv1WyDSoHo2s.p59IKM_M6iaVGdh6EiF",
"ContentType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
"ServerSideEncryption": "AES256",
"Metadata": {},
"ReplicationStatus": "COMPLETED"
}
【问题讨论】:
标签: amazon-s3