Unable to Integrate API keys and Usage Plans

I have added the following config into my template per the serverless docs:

apiKeys:
    - ${opt:stage}
  usagePlan:
    quota:
      limit: ${opt:monthly_quota}
      period: MONTH
    throttle:
      rateLimit: ${opt:rate_limit}
      burstLimit: ${opt:burst_limit}
I have also set my API config to private:
events:
      - http:
          path: add-event
          method: post
          private: true

The obvious goal is to integrate API keys and usage plans. However, I get the following error:

The CloudFormation template is invalid: Template format error: Unresolved resource dependencies 
[ApiGatewayDeployment1507566343173] in the Resources block of the template

Note that I am using the serverless-plugin-bind-deployment-id plugin.

Hi @jfoxtech, I am having the exact same issue. Were you able to resolve the problem? If yes, I would really appreciate if you could share the solution.

@ayazmaroof

Did you go through these urls, are they helpful?

https://github.com/serverless/serverless/issues/3182

https://github.com/serverless/serverless/issues/2831

I think you may have an indentation issue. And since I can’t see your provider property, I can’t tell if you have your apiKeys property nested under it our not… It should looks like this:

provider:
  name: aws
  apiKeys:
    - ${opt:stage}-myKeyName
  usagePlan:
    quota:
      limit: ${opt:monthly_quota}
      offset: 2
      period: MONTH
    throttle:
      burstLimit: ${opt:rate_limit}
      rateLimit: ${opt:burst_limit}
functions:

See Setting API keys for your Rest API in the Serverless online reference for more details.