Skip to content

Issues with lambdaAuthorizer #136

@Magnus1987

Description

@Magnus1987

We try to use the example code provided with the documentation. Swagger page gets generated but using lambdaAuthorizer we only end up with "Event references not configured authorizer". We reference an existing lambda authorizer in our code below:

custom:
  customAuthorizer:
    name: sws-lambda-authorizer-dev-authorize
  autoswagger:
    title: 'AutoSwagger Page'
    lambdaAuthorizer: ${self:custom.customAuthorizer}

functions:
  - hello-world-api:
      handler: src/hello-world-api.handler
      timeout: 30
      events:
        - http:
            path: api/hello
            method: GET
            authorizer:
              arn: arn:aws:lambda:eu-west-1:${env:account}:function:sws-lambda-authorizer-${env:STAGE}-authorize:stable
              identitySource: method.request.header.Authorization
              

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions