I’m currently having issues on adding a simple cognito userpool as the authorizer function. The serverless file specifies the authorizer but yet it is not being set in the AWS Gateway as the authorizer (confirmed by AWS console dashboard).
My serverless file looks like this:
functions: create: handler: handler.createSite events: - http: path: sites method: post integration: lambda-proxy authorizer: cognitoAuthorizer cors: origins: - '*' headers: - Content-Type - X-Amz-Date
And under resources I have this:
resources: apiGatewayAuthorizer: Type: AWS::ApiGateway::Authorizer Properties: Name: cognitoAuthorizer Type: COGNITO_USER_POOLS IdentitySource: method.request.header.Authorization RestApiId: Ref: ApiGatewayRestApi ProviderARNs: - 'arn:aws:cognito-idp:us-east-1:2xxxxxx8:userpool/us-east-1_5kKNNXXX'
Am I doing anything wrong here? I feel like this should be very easy thing to do, yet I’m having massive issues using Cognito with serverless.