You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The X-Amzn-Trace-Id header can be used to for X-ray tracing. If for instance you enable X-ray tracing on API Gateway, the gateway will generate this header for you if it is not provided.
Why should you provide your own you may ask? You could for instance create a private API Gateway that can be called from within your own AWS Lambda functions. If the AWS Lambda function calls the gateway, the gateway will generate a new trace id and we will end up with 2 different traces. Trace 1 being the original lambda invocation, and trace two everything after the API Gateway. If we want this to form one trace from start to end, you can set the X-Amzn-Trace-Id header yourself when calling the API GW (the trace id is stored in the environment variable process.env._X_AMZN_TRACE_ID).
When setting this header BEFORE signing, you will end up with the message Invalid signature. So this means that we will have to remove this header before signing, and add it back after signing.
The text was updated successfully, but these errors were encountered:
The
X-Amzn-Trace-Id
header can be used to for X-ray tracing. If for instance you enable X-ray tracing on API Gateway, the gateway will generate this header for you if it is not provided.Why should you provide your own you may ask? You could for instance create a private API Gateway that can be called from within your own AWS Lambda functions. If the AWS Lambda function calls the gateway, the gateway will generate a new trace id and we will end up with 2 different traces. Trace 1 being the original lambda invocation, and trace two everything after the API Gateway. If we want this to form one trace from start to end, you can set the
X-Amzn-Trace-Id
header yourself when calling the API GW (the trace id is stored in the environment variableprocess.env._X_AMZN_TRACE_ID
).When setting this header BEFORE signing, you will end up with the message
Invalid signature
. So this means that we will have to remove this header before signing, and add it back after signing.The text was updated successfully, but these errors were encountered: