Skip to content

Fn::ImportValue for authorizer arn in websockets doesn't work like HTTP #8328

Description

@suparngp

This is currently supported in HTTP api like mentioned in this issue #4771.

...
custom:
  defaultStage: test
  currentStage: ${opt:stage, self:custom.defaultStage}
  authorizerArn:
    Fn::ImportValue: MyAuthorizerArn-${self:custom.currentStage}

functions:
  adminsOnly:
    handler: handler.hiAdmins
    events:
      - http:
          path: /hiAdmins
          method: get
          authorizer:
            name: authorizer
            arn: ${self:custom.authorizerArn}

But in case of websocket events, sls still tries to fetch the name of the authorizer from imported arn which is undefined at that moment.

Is it possible to do this any other way?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions