We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description:
Usage plans for auth on APIs was added in #1141
Looking at ApiAuth docs (the Auth field on AWS::Serverless::Api objects) - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-apiauth.html - the UsagePlan field is present.
UsagePlan
But implicit APIs (Api events under AWS::Serverless::Function) - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-apifunctionauth.html - are missing that field. So the APIs produced by Lambda functions in SAM don't seem to support this field, which would be useful. Is it possible to support it?
Steps to reproduce the issue:
Add to a SAM template:
MyFunction: Type: AWS::Serverless::Function Properties: CodeUri: lambdas/my-function Handler: index.lambdaHandler Runtime: nodejs12.x Events: MyFunctionApi: Type: Api Properties: Path: /my-function Method: post Auth: ApiKeyRequired: true UsagePlan: CreateUsagePlan: PER_API
Observed result:
When deployed, this API is created, but no usage plan or API key are.
Expected result:
The API is created, with a usage plan and API key - in the same way they would if it was a top-level API object, as described in #1141
The text was updated successfully, but these errors were encountered:
@mcintyre94 for setting UsagePlan for Implicit API please add it in Globals or else UsagePlan can only be used with explicit Apis.
Globals
Sorry, something went wrong.
No branches or pull requests
Description:
Usage plans for auth on APIs was added in #1141
Looking at ApiAuth docs (the Auth field on AWS::Serverless::Api objects) - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-apiauth.html - the
UsagePlan
field is present.But implicit APIs (Api events under AWS::Serverless::Function) - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-apifunctionauth.html - are missing that field. So the APIs produced by Lambda functions in SAM don't seem to support this field, which would be useful. Is it possible to support it?
Steps to reproduce the issue:
Add to a SAM template:
Observed result:
When deployed, this API is created, but no usage plan or API key are.
Expected result:
The API is created, with a usage plan and API key - in the same way they would if it was a top-level API object, as described in #1141
The text was updated successfully, but these errors were encountered: