New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serverless-dynamodb-autoscaling

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-dynamodb-autoscaling

Serverless Plugin for Amazon DynamoDB Auto Scaling configuration.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

⚡️ Serverless Plugin for DynamoDB Auto Scaling

npm CircleCI license Coveralls

With this plugin for serverless you can set DynamoDB Auto Scaling configuratin in your serverless.yml file. The plugin supports multiple tables and separate configuration sets for read and write capacities.

Usage

Add the npm package to your project:

# Via yarn
$ yarn add serverless-dynamodb-autoscaling

# Via npm
$ npm install serverless-dynamodb-autoscaling --save

Configuration

Add the plugin to your serverless.yml:

plugins:
  - serverless-dynamodb-autoscaling

Configure DynamoDB Auto Scaling in serverless.yml:

custom:
  capacities:
    - name: custom-table  # DynamoDB table 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
    - name: custom-table-2nd
      read:
        minimum: 5
        maximum: 1000

That's it! After the next deployment (sls deploy) serverless will configure your Auto Scaling for DynamoDB.

DynamoDB

The configuration above works fine for a default DynamoDB table configuration.

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

License

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

Contribution

You are more than welcome to contribute to this project! 😘

To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and believes and will make working together a happier experience.

Keywords

FAQs

Package last updated on 18 Jul 2017

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