问题
I would like to use an API Gateway HTTP integration towards an endpoint, where certain parts of the URL are provided by the custom authorizer (e.g., user ID or user grants).
I could definitely use a Lambda integration but that introduces quite significant response time overhead.
Unfortunately syntax that works for stageVariables does not seem to work for custom authorizer context - ${context.authorizer.variableName}.
Note: To answer some comments, yes, the warning sign is there bacause I used a dummy url string. Has nothing to do with the fact that replacement of authorizer context variables does not work for me, no matter what the URL is.
回答1:
The URL needs to valid, meaning like https://example.com/foo with a protocol and hostname.
Starting with url/ is never going to be valid.
来源:https://stackoverflow.com/questions/46164747/custom-authorizer-context-variable-in-api-gateway-http-integration-url