Serverless Add Api Key

homepage icon https://github.com/rrahul963/serverless-add-api-key
Follow @rrahul963

Tracked

NPM Downloads Last Month
785
Issues
0
Stars
2
Forks
6
Watchers
2
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

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.