I’d like to script what I do by hand in the AWS console:
I tried with
functions:
my-backend:
handler: com.my.backend.LambdaHandler
events:
- http:
path: /{proxy}
method: any
authorizer:
type: COGNITO_USER_POOLS
name: my-auth
id: xxxxxx
identitySource: method.request.header.Authorization
- cognitoUserPool:
pool: eu-west-1_xxxxx
serverless deploy
return Function "my-auth" doesn't exist in this Service
although I created it by hand and tested it.
Is it possible to have it created automatically?
EDIT:
I managed to get rid of the “function not found” error by using the arn of my cognito pool to the authorizer
Now I get a request timeout while testing the lambda.