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

feat(aws-dynamodb) add support for dynamodb PAY_PER_REQUEST billing mode (#1313) #1366

Merged
merged 5 commits into from
Dec 14, 2018

Conversation

sam-goodwin
Copy link
Contributor

Adds support for DynamoDB Billing Modes. See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode

Fixes #1313


Pull Request Checklist

Please check all boxes, including N/A items:

Testing

  • Unit test and/or integration test added
  • Toolkit change?: integration tests manually executed (paste output to the PR description)
  • Init template change?: coordinated update of integration tests (currently maintained in a private repo).

Documentation

  • README: README and/or documentation topic updated
  • jsdocs: All public APIs documented

Title and description

  • Change type: Title is prefixed with change type:
    • fix(module): <title> bug fix (patch)
    • feat(module): <title> feature/capability (minor)
    • chore(module): <title> won't appear in changelog
    • build(module): <title> won't appear in changelog
  • Title format: Title uses lower case and doesn't end with a period
  • Breaking change?: Last paragraph of description is: BREAKING CHANGE: <describe exactly what changed and how to achieve similar behavior + link to documentation/gist/issue if more details are required>
  • References: Indicate issues fixed via: Fixes #xxx or Closes #xxx

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

@sam-goodwin sam-goodwin requested a review from a team as a code owner December 14, 2018 11:17
@RomainMuller RomainMuller merged commit 9ebe28b into master Dec 14, 2018
@RomainMuller RomainMuller deleted the samgood/ddb-ondemand branch December 14, 2018 13:35
private readonly tableScaling: ScalableAttributePair = {};
private readonly indexScaling = new Map<string, ScalableAttributePair>();
private readonly scalingRole: iam.IRole;

constructor(parent: Construct, name: string, props: TableProps = {}) {
super(parent, name);

this.billingMode = props.billingMode || BillingMode.Provisioned;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This style is a bit sensitive. If billingMode had been a number, then 0 would evaluate to "false". Rather write: props.billingMode !== undefined ? props.billingMode : BillingMode.Provisioned

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.

DynamoDB Support for BillingMode
3 participants