-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Closed
Copy link
Description
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:
- 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
- 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:
- I expect
AWS::Serverless::Api
to accept this parameterApiKeySourceType
because it's supported in theAWS::ApiGateway::RestApi
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html#cfn-apigateway-restapi-apikeysourcetype
Note: I tried to use AWS::ApiGateway::RestApi
to define my API in the SAM template but it didn't work out.
znas-io, RocktimRajkumar, komikoni, murillio4, fangji0310 and 14 moreyiting604, lee-11 and scott-11