Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
serverless-plugin-dynamo-autoscaling
Advanced tools
Serverless Plugin to deploy DynamoDB Autoscaling
Serverless Plugin to enable autoscaling for dynamodb tables and its GSI.
# 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
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
maximum: 200
minimum: 5
targetUsage: 75
If no roleArn
is specified, plugin will automatically create one and use it.
If you only want to enable Auto Scaling for the index, use indexOnly: true
to skip Auto Scaling for the general DynamoDB table.
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
Feel free to use the code, it's released using the MIT license.
FAQs
Serverless Plugin to deploy DynamoDB Autoscaling
We found that serverless-plugin-dynamo-autoscaling demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.