Skip to content

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