Skip to content

Allow previously created Authorizer for AWS::Serverless::HttpApi #1785

@iRoachie

Description

@iRoachie

Description:

Currently, SAM Creates a new authorizer for AWS::Serverless::HttpApi when adding an Auth property. At our company, auth is managed in a central location with user pools, resource servers, user pool clients, and authorizers. This makes it easier to change permissions of app clients across different APIs without having to redeploy each application.

Ideally, I'd like to reference an already created Oauth2Authorizer to use in my sam template.

Example Usage

Type: AWS::Serverless::HttpApi
Properties:
  Auth: 
    Authorizers:
      Authorizer: !Ref MyPreviouslyCreatedAuthorizer (Ref to AWS::ApiGatewayV2::Authorizer)
      AuthorizationScopes: ['users/read']

I'm willing to attempt implementing this if this features aligns with the project roadmap. Let me know 👋

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions