Skip to content

Expose Lambda request ID and trace ID to environment variables#2035

Merged
mnapoli merged 3 commits intov3from
request-id-env-var
Feb 23, 2026
Merged

Expose Lambda request ID and trace ID to environment variables#2035
mnapoli merged 3 commits intov3from
request-id-env-var

Conversation

@mnapoli
Copy link
Member

@mnapoli mnapoli commented Dec 5, 2025

Expose these new environment variables on every invocation:

  • _X_AMZN_TRACE_ID is a standard AWS Lambda variable that contains the X-Ray trace ID (it is exposed by default on native runtimes)
  • LAMBDA_REQUEST_ID now contains the current AWS Lambda request ID

These can then be used in logs to group logs of the same invocation.

@mnapoli mnapoli merged commit 516225b into v3 Feb 23, 2026
8 checks passed
@mnapoli mnapoli deleted the request-id-env-var branch February 23, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant