-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance configuration API #8
Conversation
Thanks @sbstjn 👍 |
Thanks for the feedback. Based on the CloudFormation resource I think the global secondary index has no CloudFormation resource identifier. They seem to be always referenced by the combination of the table resource/name and the name of the index: CustomTableC:
Type: AWS::DynamoDB::Table
Properties:
TableName: custom-table-C
GlobalSecondaryIndexes:
- IndexName: custom-index
KeySchema:
- AttributeName: key
KeyType: HASH
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5 Based on this, I think it's not possible to just provide an The |
I have extended the |
…utoscaling into enhance-api
README.md
Outdated
[![license](https://img.shields.io/github/license/sbstjn/serverless-dynamodb-autoscaling.svg)](https://github.com/sbstjn/serverless-dynamodb-autoscaling/blob/master/LICENSE.md) | ||
[![Coveralls](https://img.shields.io/coveralls/sbstjn/serverless-dynamodb-autoscaling.svg)](https://coveralls.io/github/sbstjn/serverless-dynamodb-autoscaling) | ||
|
||
With this plugin for [serverless](https://serverless.com) 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 using AWS [native DynamoDB Auto Scaling](https://aws.amazon.com/blogs/aws/new-auto-scaling-for-amazon-dynamodb/). | ||
With this plugin for [serverless](https://serverless.com), you can enable DynamoDB Auto Scaling for tables and **Global Secondary Indexes** easily in your `serverless.yml` configuration file. The plugin supports multiple tables and indexes, as well separate configuration sets for `read` and `write` capacities using Amazon's [native DynamoDB Auto Scaling](https://aws.amazon.com/blogs/aws/new-auto-scaling-for-amazon-dynamodb/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... as well as separate configuration sets for read
and write
src/plugin.js
Outdated
assert(this.serverless.service.provider.stage, 'Invalid serverless configuration') | ||
|
||
assert(this.serverless.service.custom, 'Not Auto Scaling configuration found') | ||
assert(this.serverless.service.custom.capacities, 'Not Auto Scaling configuration found') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not Auto Scaling configuration found
👍
|
src/plugin.js
Outdated
* Generate CloudFormation resources for DynamoDB table and indexes | ||
* | ||
* @param {string} table | ||
* @param {obejct} config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: object
Thanks, @sbstjn. Except for a couple of typos, changes looks good 👍 |
Thanks for checking 👍 |
@sbstjn Is there any support for scaling tables in other stacks at all? I am trying to autoscale a table that is currently existing but not in the stack |
table
property supports string and array as value(s)index
property to scaleGlobalSecondaryIndexes
Apply same settings to global secondary indexes #2Tasks
DependsOn
handlingREADME.md
names.js
This branch supports flexible Auto Scaling for tables and/or global secondary indexes with the following configurations: