Entity tag
An entity tag is an opaque HTTP validator assigned by a server to a selected representation for cache validation and conditional requests.
An ETag identifies a representation within the server's validation rules; it is not a portable file digest, a deduplication key, or a monotonically increasing version counter. Preserve the returned value when sending a conditional request rather than deriving one from the object's bytes. In Amazon S3, ETags and explicitly named checksum fields serve different purposes.
Relations
- related
- object-storage, conditional-write, multipart-upload
Advantages
- HTTP conditional requests can validate cached representations or reject a write when the supplied validator no longer matches the current representation. [1]
- Amazon S3 PutObject and CompleteMultipartUpload accept an existing object's ETag through If-Match for a server-side write precondition. [3]
Limitations
- In S3 general-purpose buckets, an ETag can equal the object-data MD5 for supported single-part operations with plaintext or SSE-S3 encryption, but multipart upload and SSE-KMS or SSE-C do not provide that MD5 guarantee. [2]
- S3 ETags reflect object contents, not metadata; matching ETags are not proof that no intervening write or metadata change occurred. [2, 4]
- HTTP If-Match requires strong comparison, so a weak validator such as W/"example" cannot establish a strong match. [1]