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

Support Version 2 of DynamoDB Global Tables #5752

Closed
2 tasks
mmesserman-verimatrix opened this issue Jan 10, 2020 · 1 comment · Fixed by #5821
Closed
2 tasks

Support Version 2 of DynamoDB Global Tables #5752

mmesserman-verimatrix opened this issue Jan 10, 2020 · 1 comment · Fixed by #5821
Assignees
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@mmesserman-verimatrix
Copy link

Support in CDK for the new version of Global Tables in DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) - standard CRUD-style operations.

Use Case

We use global tables in several of the services that we deploy with CDK. However v1 of the DDBG tables was limiting in that you could not promote a non-global table to become global once it was populated, and you could not add regions to an existing global table - we need to be able to do both of these, to support our customers in multiple regions. V2 of DDBG allows for this, so we would like to use this in our services, but CDK does not currently support it.

Proposed Solution

Implement DDBGv2 in CDK - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html

Other

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@mmesserman-verimatrix mmesserman-verimatrix added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 10, 2020
@SomayaB SomayaB added the @aws-cdk/aws-dynamodb Related to Amazon DynamoDB label Jan 13, 2020
jogold added a commit to jogold/aws-cdk that referenced this issue Jan 15, 2020
Add support for global tables version 2019.11.21.

Version 2019.11.21 (current) of global tables enables to dynamically add new
replica tables from a table populated with data. It is more efficient and
consumes less write capacity than version 2017.11.29.

Uses the custom resource provider framework (async) to update the table
(`onEvent`) and check for replica creation (`isComplete`).

Tables no longer have to be created in separate "regional" stacks and then
"glued" together with a custom resource as in `@aws-cdk/aws-dynamodb-global`.
This means that a separate module is no longer justified.

Deprecate `@aws-cdk/aws-dynamodb-global`: it uses version 2017.11.29 and the API
and custom resource implementation for version 2019.11.21 is much cleaner.

See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html

Closes aws#5752
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jan 15, 2020
@SomayaB
Copy link
Contributor

SomayaB commented Jan 15, 2020

Hi @mmesserman-verimatrix, thanks for submitting a feature request! Looks like @jogold is already on it! Thanks 👍

@SomayaB SomayaB removed the needs-triage This issue or PR still needs to be triaged. label Jan 15, 2020
@skinny85 skinny85 added the effort/large Large work item – several weeks of effort label Feb 6, 2020
@mergify mergify bot closed this as completed in #5821 Feb 11, 2020
mergify bot added a commit that referenced this issue Feb 11, 2020
* feat(dynamodb): global tables version 2019.11.21

Add support for global tables version 2019.11.21.

Version 2019.11.21 (current) of global tables enables to dynamically add new
replica tables from a table populated with data. It is more efficient and
consumes less write capacity than version 2017.11.29.

Uses the custom resource provider framework (async) to update the table
(`onEvent`) and check for replica creation (`isComplete`).

Tables no longer have to be created in separate "regional" stacks and then
"glued" together with a custom resource as in `@aws-cdk/aws-dynamodb-global`.
This means that a separate module is no longer justified.

Deprecate `@aws-cdk/aws-dynamodb-global`: it uses version 2017.11.29 and the API
and custom resource implementation for version 2019.11.21 is much cleaner.

See https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html

Closes #5752

* fix test

* extract to private method

* switch in isComplete

* decdk

* region check

* types

* replicationRegions

* default to PAY_PER_REQUEST

* remove useless PAY_PER_REQUEST in tests

* monocdk-experiment

* table status and no updates

* replicationRegions in aws-dynamodb-global

* added @experimental tag to `replicationRegions

* remove streamSpecification = undefined

Co-authored-by: Elad Ben-Israel <benisrae@amazon.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-dynamodb Related to Amazon DynamoDB effort/large Large work item – several weeks of effort feature-request A feature should be added or improved. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants