Hi All!
we have a problem with Authorization COGNITO_USER_POOLS.
If I set in the Authorization header as the token received by signing in a user registered in a cognito user pool, I get the following error by performing a request using postman setting the Authorization header with a valid session token.
{
"message": "Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=TOKEN"
}
I enabled standard CORS and no token validation
events:
- http:
authorizer: ${self:custom.cognitoAuthorizer}
path: todo/{id}
method: get
cors:
origin: '*'
headers:
- Authorization
custom:
cognitoPoolArn: "arn:aws:cognito-idp:eu-central-1:user_id:userpool/ID_POOL"
cognitoAuthorizer:
arn: ${self:custom.cognitoPoolArn}
any idea?