Socket
Socket
Sign inDemoInstall

serverless-plugin-dynamo-autoscaling

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-dynamo-autoscaling

Serverless Plugin to deploy DynamoDB Autoscaling


Version published
Maintainers
1
Created
Source

⚡️ Serverless Plugin for DynamoDB Auto Scaling

Build Status Coverage Status npm GitHub license dependencies Status

Serverless Plugin to enable autoscaling for dynamodb tables and its GSI.

Installation

# Via yarn
$ yarn add serverless-plugin-dynamo-autoscaling

# Via npm
$ npm install serverless-plugin-dynamo-autoscaling

Add the plugin to your serverless.yml:

plugins:
  - serverless-plugin-dynamo-autoscaling

Configuration

custom:
  autoscaling:
    - table: CustomTable  # DynamoDB Resource
      index:              # List or single index name - Optional
        - custom-index-name
      roleArn:            # Arn of the role to be associated - Optional
      read:
        minimum: 5        # Minimum read capacity
        maximum: 1000     # Maximum read capacity
        targetUsage: 75   # Targeted usage percentage
      write:
        minimum: 40       # Minimum write capacity
        maximum: 200      # Maximum write capacity
        targetUsage: 50   # Targeted usage percentage

Defaults

maximum: 200
minimum: 5
targetUsage: 75

If no roleArn is specified, plugin will automatically create one and use it.

Index Only

If you only want to enable Auto Scaling for the index, use indexOnly: true to skip Auto Scaling for the general DynamoDB table.

DynamoDB

The example serverless configuration above works fine for a DynamoDB table CloudFormation resource like this:

resources:
  Resources:
    CustomTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: custom-table
        AttributeDefinitions:
          - AttributeName: key
            AttributeType: S
        KeySchema:
          - AttributeName: key
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 5
          WriteCapacityUnits: 5
        GlobalSecondaryIndexes:
          - IndexName: custom-index-name
            KeySchema:
              - AttributeName: key
                KeyType: HASH
            Projection:
              ProjectionType: ALL
            ProvisionedThroughput:
              ReadCapacityUnits: 5
              WriteCapacityUnits: 5

Thanks

License

Feel free to use the code, it's released using the MIT license.

Keywords

FAQs

Package last updated on 19 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc