I am configuring an app with various frontends (mobile and web apps) and a single API backend, powered by Lambda and accessed via AWS API Gateway.
As I\'m planning to us
For those looking for an answer and are not using OAuth and are deploying using Serverless framework:
What worked for me to make APGW accept accessToken was to modify my serverless.yml file as follows:
functions:
my-function:
handler: path to source file
events:
- http:
path: my-function
method: post
cors: true
authorizer:
type: COGNITO_USER_POOLS
scopes:
- YOUR SCOPE HERE <- THIS IS THE TRICK
authorizerId:
Ref: ApiGatewayAuthorizer
The value of the scope can be found by reading the contents of your accessToken (for by pasting the token into https://jwt.io/ debugger).