AWS Api Gateway docs is crystal clear about the capacity of API Clients override de Request ID here:
More specific on the $context.requestId description: "An ID for the request. Clients can override this request ID. Use $context.extendedRequestId for a unique request ID that API Gateway generates."
I'm trying to send an requestId to override the one generated inside Api Gateway, but i'm cant figure out how.
Any one knows hot to do that?
CodePudding user response:
You do this by adding the same header to the ingoing request:
x-amzn-RequestId=ABC123
This will cause the $context.requestId
to equal ABC123
, and the extendedRequestId
will be the shorter random char string value. There will not be a UUID type Id given.