Serverless Plugin for AWS Lambda Provisioned Concurrency Auto Scaling configuration.
Related blog post can be found on the Neiman Marcus Medium page.
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
Add concurrencyAutoscaling
parameters under each function you wish to autoscale in your serverless.yml
.
# minimal configuration
functions:
hello:
handler: handler.hello
provisionedConcurrency: 1
concurrencyAutoscaling: true
# full configuration
world:
handler: handler.world
provisionedConcurrency: 1
concurrencyAutoscaling:
enabled: true
maximum: 10
minimum: 1
usage: 0.75
scaleInCooldown: 120
scaleOutCooldown: 0
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.
maximum: 10
minimum: 1
usage: 0.75
scaleInCooldown: 120
scaleOutCooldown: 0
N/A
- 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.
- serverless-dynamodb-autoscaling - Original plugin this module is based on.