Endemolshinegroup Serverless DynamoDB Autoscaler

Autoscale DynamoDB resources with a single AWS AutoScalingPlan

View on Github

Banner

MIT Licensed NPM Version Build Status Greenkeeper Status

Code Issues Codebase Maintainability Test Coverage Jest

Commitizen Semantic Release Prettier

Autoscale DynamoDB resources with a single AWS AutoScalingPlan

Installation

yarn add -D @endemolshinegroup/serverless-dynamodb-autoscaler

Usage

Add the plugin to your serverless.yml:

plugins:
  - @endemolshinegroup/serverless-dynamodb-autoscaler

Configuration

Add a capacities property to your serverless.yml:

custom:
  capacities:
    - table: CustomTable  # DynamoDB Resource
      index:              # List or single index name
        - custom-index-name
      read:
        minimum: 5        # Minimum read capacity
        maximum: 1000     # Maximum read capacity
        usage: 0.75       # Targeted usage percentage
      write:
        minimum: 40       # Minimum write capacity
        maximum: 200      # Maximum write capacity
        usage: 0.5        # Targeted usage percentage

Finish by running sls deploy and you're good to go!