JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 18378
  • Score
    100M100P100Q173826F
  • License Apache-2.0

Serverless Plugin for AWS Lambdas Provisioned Concurrency Auto Scaling Configuration.

Package Exports

  • serverless-provisioned-concurrency-autoscaling
  • serverless-provisioned-concurrency-autoscaling/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-provisioned-concurrency-autoscaling) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

logo

⚡️ serverless-provisioned-concurrency-autoscaling

npm build license pr

Serverless Plugin for AWS Lambda Provisioned Concurrency Auto Scaling configuration.

Related blog post can be found on the Neiman Marcus Medium page.

Usage

Add the NPM package to your project:

$ npm install serverless-provisioned-concurrency-autoscaling

Add the plugin to your serverless.yml:

plugins:
  - serverless-provisioned-concurrency-autoscaling

Configuration

Add concurrencyAutoscaling parameters under each function you wish to autoscale in your serverless.yml.

Add customMetric: true if you want to use Maximum instead of Average statistic.

# minimal configuration

functions:
  hello:
    handler: handler.hello
    provisionedConcurrency: 1
    concurrencyAutoscaling: true

  # full configuration

  world:
    handler: handler.world
    provisionedConcurrency: 1
    concurrencyAutoscaling:
      enabled: true
      alias: provisioned
      maximum: 10
      minimum: 1
      usage: 0.75
      scaleInCooldown: 120
      scaleOutCooldown: 0
      customMetric:
        statistic: maximum

That's it! With the next deployment, serverless will add Cloudformation resources to scale provisioned concurrency!

You must provide atleast provisionedConcurrency and concurrencyAutoscaling to enable autoscaling. Set concurrencyAutoscaling to a boolean, or object with configuration. Any omitted configuration will use module defaults.

Defaults

alias: provisioned
maximum: 10
minimum: 1
usage: 0.75
scaleInCooldown: 120
scaleOutCooldown: 0

Known Issues/Limitations

N/A

Authors

Conduct / Contributing / License

  • Refer to our contribution guidelines to contribute to this project. See CONTRIBUTING.md.
  • All contributions must follow our code of conduct. See CONDUCT.md.
  • This project is licensed under the Apache 2.0 license. See LICENSE.

Acknowledgments