I tried the Mathias solution and at first it didn't work. Oddly enough, I can return to it after a few hours and try again, and this time made some other changes to my API gateway before deploying the API. This time it worked, although the other changes that I made were superficial.
Also, as is often the case, AWS docs are erroneous, stating that you should use method.response.header.Authorization . This is only true for Lambdas using custom auth. You really should only use Authorization here when using the new Cognito authorized user pool.
- Use
Authorization not method.response.header.Authorization - Make a surface change to your resource in the API gateway
- Expand your API and wait a second
- change -
I just converted my stack to Cloudformation and found out that if you use Cloudformation to deploy Authorizer, you really need to specify the full method.response.header.Authorization for the token source. In fact, stack deployment will fail if you do not use this format. However, after deployment, if you look at the Authorizer in the console, it will lose part of method.response.header .
source share