I saw a lot of answers on this question, but I want a valid answer, the access token from cognito is not working but the id_token works. That's my Authorizer:
ApiGatewayAuthorizer:
Type: AWS::ApiGateway::Authorizer
Properties:
Name: ${self:custom.tablePrefix}-api-authorizer-${self:provider.stage}
Type: COGNITO_USER_POOLS
RestApiId: ${file(./config/${self:provider.stage}.yml):${self:provider.region}.deploymentRestApiId}
IdentitySource: method.request.header.Authorization
ProviderARNs:
- !GetAtt CognitoUserPool.Arn