/serverless-add-api-key

creates a api key and usage pattern (if they don't already exist) and associates them to the Rest Api

Primary LanguageJavaScriptApache License 2.0Apache-2.0

serverless-add-api-key

serverless

A serverless plugin to create api key and usage pattern (if they don't already exist) and associate them to the Rest Api. Serverless provides this functionality natively but it doesn't allow you to associate multiple services with same apiKey and usage plan. This plugin associates your Serverless service with same api key if the key already exists. Also works with multiple keys.

Install

npm install --save-dev serverless-add-api-key

Add the plugin to your serverless.yml file:

plugins:
  - serverless-add-api-key

Configuration

custom:
  apiKeys: [<api key name>]

Code automatically creates a usage plan called <api-key-name>-usage-plan.