X-Amzn-RequestId

The HTTP X-Amzn-RequestId response header is an unofficial, AWS-specific header containing a unique identifier assigned to each request processed by AWS services such as API Gateway, Lambda, DynamoDB, and other managed endpoints.

Usage

AWS services generate a unique request ID for every incoming API call and return the value in the X-Amzn-RequestId response header. The identifier is a UUID (version 4) string, providing a reference for tracing requests through AWS infrastructure and for opening support cases with AWS.

The header appears in responses from a wide range of AWS services including API Gateway, Lambda, DynamoDB, SQS, SNS, and Cognito. Logging this value on the client side allows correlating application-level observations with AWS CloudWatch logs and CloudTrail entries, where the same request ID is recorded.

Note

AWS uses different request ID header names across services. Amazon S3 returns X-Amz-Request-Id (with a different capitalization and naming pattern), while API Gateway and most other AWS services return X-Amzn-RequestId. When API Gateway proxies an upstream AWS service, the upstream request ID is sometimes remapped into X-Amzn-Remapped-X-Amzn-RequestId.

The header serves a similar purpose to X-Request-Id, which fulfills the same role in non-AWS environments.

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

UUID string

The value is a UUID v4 string in the standard 8-4-4-4-12 hexadecimal format. Each request produces a different identifier regardless of whether the request succeeds or fails. The value is opaque and carries no encoded metadata.

Example

A response from an AWS API Gateway endpoint includes the request identifier as a UUID. The value acts as a lookup key when searching CloudWatch logs or when filing an AWS support case.

X-Amzn-RequestId: 66b53bf4-73c1-486c-af83-18293d603e7f

Different requests to the same service produce distinct identifiers. A Lambda function invoked through API Gateway returns its own request ID.

X-Amzn-RequestId: bf7a7f68-27b8-4baf-9408-0c9a31ed1c38

When API Gateway proxies a request to another AWS service, the original request ID from the upstream service is remapped into a separate header. The response includes both the gateway's own request ID and the remapped upstream identifier.

X-Amzn-RequestId: cb79e005-acfe-49d5-a88c-d037d497f1d6
X-Amzn-Remapped-X-Amzn-RequestId: f2de7cc6-b57c-438e-a736-e15d31025acf

Takeaway

The X-Amzn-RequestId header provides a UUID assigned by AWS services to each API request, used for log correlation and support case resolution across API Gateway, Lambda, DynamoDB, and other managed AWS endpoints.

See also

Last updated: March 6, 2026