Skip to content

Pproperty ApiKeySourceType not defined for resource of type AWS::Serverless::Api #1274

@bitconym

Description

@bitconym

Description:
I wanted to specify the Api Key Source to AUTHORIZER in the SAM template.yaml file since I use custom Lambda authorizer but it didn't succeed.

Steps to reproduce the issue:

  1. Create new SAM project and try to add a new resource that uses AWS::Serverless::Api similar to:
Resources:
  MyApi:
    Type: AWS::Serverless::Api
    Properties:
      ApiKeySourceType: AUTHORIZER
      StageName: Prod
  1. run sam validate

Observed result:
When running sam validate I got the error:

Error: [InvalidResourceException('MyApi', 'property ApiKeySourceType not defined for resource of type AWS::Serverless::Api')] ('MyApi', 'property ApiKeySourceType not defined for resource of type AWS::Serverless::Api')

Expected result:

Note: I tried to use AWS::ApiGateway::RestApi to define my API in the SAM template but it didn't work out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions