EndemolShineGroup / serverless-dynamodb-autoscaler

Autoscale DynamoDB resources with a single AWS AutoScalingPlan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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!

About

Autoscale DynamoDB resources with a single AWS AutoScalingPlan

License:MIT License


Languages

Language:TypeScript 97.3%Language:JavaScript 2.7%