X-Amz-Version-Id

The HTTP X-Amz-Version-Id response header is an unofficial, AWS-specific header returning the version identifier of an object stored in Amazon S3 when bucket versioning is enabled.

Usage

Amazon S3 supports object versioning at the bucket level. When versioning is enabled, S3 assigns a unique version ID to each object on every upload. The X-Amz-Version-Id header appears in responses to GET, PUT, and DELETE operations, identifying the specific version of the object involved in the request.

The version ID is an opaque string generated by S3. The format varies in length and character set, but the value has no documented internal structure. Clients store this value to reference specific object versions in subsequent requests, such as retrieving or deleting a particular version. When an object was stored before versioning was enabled on the bucket, the version ID is the literal string null.

This header works alongside ETag and If-Match for conditional requests. A version ID pinpoints the exact revision, while the ETag confirms the content hash. Together, they enable precise version management in S3 workflows.

Note

The "X-" naming convention for HTTP headers, "X" referring to "experimental", has been deprecated and needs to be transitioned to the formal naming convention for HTTP headers.

Values

Version identifier string

The value is an opaque alphanumeric string generated by S3 when an object is written to a versioning-enabled bucket. Each PUT or copy operation produces a new version ID. The string is not intended for parsing or decoding.

null

The literal string null appears when the object was stored before versioning was enabled on the bucket, or when versioning is suspended and a null version is created.

Example

A versioning-enabled S3 bucket returns the version ID for each stored object. The value is an opaque string with no readable meaning beyond identifying the specific object version.

X-Amz-Version-Id: 3HL4kqCxf3vjVBH40Nrjfkd

Different objects and uploads produce distinct version IDs. The string format and length vary across objects.

X-Amz-Version-Id: ZFge.bkW5OA8TT6tkgWLfup6yx3vM9Vj

Objects stored before versioning was enabled on the bucket return the literal string null as the version ID.

X-Amz-Version-Id: null

A typical S3 response includes the version ID alongside other AWS-specific HTTP headers, the Content-Type, and request identifiers.

Content-Type: image/jpeg
X-Amz-Version-Id: oK02atKSIpajXClbbFyhwsORAKVaLWlR
X-Amz-Request-Id: ZFQ6A0RQV9FWMYZM
X-Amz-Id-2: fvh94QXfPmBJbIEVeHyC7/u46doLVBM1mNo2TtaqNZpwxWqOODzgHm7+jicoFZQHmLBk9UVYVPw=
X-Amz-Server-Side-Encryption: AES256

Takeaway

The X-Amz-Version-Id header identifies the specific version of an S3 object, enabling precise retrieval, deletion, and conditional operations on versioning-enabled buckets.

See also

Last updated: March 6, 2026