I am using X-Ray tracing in API Gateway and Lambda authorizer. Inside the authorizer, I am calling two HTTP URLs.
When I give invalid URL for one http call, I am throwing callback ("unauthorized") from lambda authorizer. Hence, the response status will be 401. When I look into the response headers, I couldn't find X-Amzn-Trace-Id.
When the URL is valid and status is 200,
X-Amzn-Trace-Id
is seen in response headers.
Is there anyway to retrieve X-Amzn-Trace-Id
irrespective of the status (always)?