Skip to content
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

Creating "Pay per request" as default BillingMode unless otherwise specified #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kelyvin
Copy link

@kelyvin kelyvin commented Aug 8, 2019

Since the last release of this project, DynamoDB now supports a new billing mode of "Pay Per Request", which sets your DynamoDB table as on-demand. Previously the default setup was to create a Table with a provisioned throughput of 10. If you are creating multiple tables (especially for testing purposes), this can increase your AWS costs significantly. You can read more about this change here

This check-in will set default table creation as PAY_PER_REQUEST unless provisionedThroughput is called.

Code Changes

  • On default table schema generation, set the BillingMode attribute to PAY_PER_REQUEST, which will set the read/write capacity mode of the table to on-demand by default
  • When calling the .provisionedThroughput or setting the ProvisionedThroughput attribute on migration table creation, we set the BillingMode back to PROVISIONED
  • Update default schema setup to prevent using the same config for both secondary index and table creation and not provide a BillingMode unless one is specified (i.e. it is only set when creating a table)
  • Update test to support new BillingMode

kelyvin added 3 commits July 25, 2019 17:52
…ode instead.

Changes
- On default table schema generation, set the `BillingMode` attribute to `PAY_PER_REQUEST`, which will set the read/write capacity mode of the table to [on-demand](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#createTable-property) by default
- When calling the `.provisionedThroughput` or setting the `ProvisionedThroughput` attribute on migration table creation, set the `BillingMode` back to `PROVISIONED`
…t provide a BillingMode unless one is specified (i.e. it is only set when creating a table)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant