From https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html:
Propagate the tracing header – Get the X-Ray tracing header from the Lambda-Runtime-Trace-Id header in the API response. Set the _X_AMZN_TRACE_ID environment variable with the same value for the X-Ray SDK to use.