Skip to content
New issue

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

apiKeys property is not nested under apiGateway property in API Gateway documentation section #566

Open
tvhees opened this issue May 2, 2023 · 0 comments

Comments

@tvhees
Copy link

tvhees commented May 2, 2023

This is a Bug Report

Description

The example YAML under Setting API keys for your Rest API was not updated to reflect nesting of apiKeys property under apiGateway when the code was changed to match the new syntax in serverless framework v3

Current example YAML:

  service: my-service
  provider:
    name: aws
    apiKeys:
      - myFirstKey
      - ${opt:stage}-myFirstKey
      - ${env:MY_API_KEY} # you can hide it in a serverless variable
    usagePlan:
      quota:
        limit: 5000
        offset: 2
        period: MONTH
      throttle:
        burstLimit: 200
        rateLimit: 100
  functions:
    hello:
      handler: handler.hello

    stepFunctions:
      stateMachines:
        statemachine1:
          name: ${self:service}-${opt:stage}-statemachine1
          events:
            - http:
                path: /hello
                method: post
                private: true
          definition:
            Comment: "A Hello World example of the Amazon States Language using an AWS Lambda Function"
            StartAt: HelloWorld1
            States:
              HelloWorld1:
                Type: Task
                Resource:
                  Fn::GetAtt: [hello, Arn]
                End: true

    plugins:
      - serverless-step-functions
      - serverless-pseudo-parameters

Expected:
Step Function and API Gateway to successfully deploy with an API Key

Outcome:
Received the following error:

Error:
Configuration error at 'provider': unrecognized property 'apiKeys'

Additional Data

  • Framework: 3.30.1
  • Plugin: 3.13.1
  • Operating System: Ubuntu 20.04.6 LTS
@tvhees tvhees changed the title Api Key documentation is outdated apiKeys property is not nested under apiGateway property in API Gateway documentation section May 2, 2023
tvhees added a commit to aligent/serverless-step-functions that referenced this issue May 2, 2023
tvhees added a commit to aligent/serverless-step-functions that referenced this issue May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant