X-Amz-Id-2
The HTTP X-Amz-Id-2 response header is an unofficial, AWS-specific header containing an extended request identifier assigned by Amazon S3, also known as the "host ID".
Usage
Amazon S3 includes the X-Amz-Id-2 header in every response alongside X-Amz-Request-Id. While the request ID identifies the request itself, the extended request ID identifies the S3 host processing the request. Together, the two values form the complete reference needed for request tracing and AWS support cases.
The value is a Base64-encoded string with no documented internal structure. The length varies across requests, typically ranging from 60 to 120 characters. Clients are not expected to decode or parse the value. Its sole purpose is log correlation on the AWS side.
When investigating S3 errors or performance issues, AWS support asks for both the X-Amz-Request-Id and the X-Amz-Id-2 values. Logging both headers on every S3 interaction makes troubleshooting faster and more precise.
The header is conceptually similar to X-Request-Id in non-AWS environments, though the split into two identifiers (request ID and host ID) is specific to S3 architecture.
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
Base64-encoded host identifier
The value is a Base64-encoded string identifying the S3 host handling the request. The string length varies and the encoding is opaque. The value changes with each request, even for repeated requests to the same object.
Example
Every S3 response includes the extended request identifier as a Base64-encoded string. The value has no readable meaning for clients and serves as a server-side lookup key.
X-Amz-Id-2: fvh94QXfPmBJbIEVeHyC7/u46doLVBM1mNo2TtaqNZpwxWqOODzgHm7+jicoFZQHmLBk9UVYVPw=
The string length varies across requests. Some responses produce shorter values while others are longer, depending on the S3 infrastructure path.
X-Amz-Id-2: oKJqs9/kzbScUOrZX5Jkt569oFI3pQq4AuvtF5jdIikJI9CIEEQw47GrhRGqwoZi1cyZrsnbaEk=
A typical S3 response includes both request identifiers alongside other AWS-specific HTTP headers. Logging all three AWS headers together provides the full context needed for support cases and debugging.
X-Amz-Request-Id: RGCVAT3G2F5FBR21
X-Amz-Id-2: /COZ1Kf0lpV5OyeVcLUDrYuGU/pc6fcCAkG3bINJecJApTFHTuGnSn3DQBhMppo7nVyOZP8e/WNmEuxhkLEmm1yn5UNIvQWL
X-Amz-Server-Side-Encryption: AES256
Content-Type: application/json
Takeaway
The X-Amz-Id-2 header provides an extended request identifier (host ID) assigned by Amazon S3, required alongside X-Amz-Request-Id for complete request tracing and AWS support case resolution.