-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-dynamodb: TableV2 should be called GlobalTable #28976
Comments
I would recommend not changing it to GlobalTable because it should be a best practice to use the underlying |
I also need clarification on the documentation. The docs describe a typical workflow for creating a regular table and then adding replicas (global tables). A global table is defined as one or more replicas. AWS Docs - Creating a Global Table Turorial However, in the CDK, a single "Global" table can exist independently (it is not a replica of anything), so we can add more replicas. This is a bit confusing. I'm doing that now, and I didn't realize it until I found an issue with PITR not getting enabled and discovered it was creating |
Wouldn't it be more straightforward to mark Table then as deprecated, if the goal is to discourage use of Table? |
Describe the feature
The
TableV2
construct should be namedGlobalTable
to provide a clear mapping to the underlying CloudFormation construct and avoid customer confusion around why it behaves differently.Use Case
The construct is confusingly named, and breaks customer expectations. Based on the name, one would have reason to expect it to create a
AWS::DynamoDB::Table
resource, when it createsAWS::DynamoDB::GlobalTable
resources. This is especially confusing because it is not mentioned at all in the documentation for the construct.This has already caused customer confusion, as reported in #27378 and #27443. The answers to those issues did not help clarify the situation, as both answers simply reported that the CDK construct didn't support the desired behavior, but failed to fully explain why. The only mention of the difference is in a blog post.
Proposed Solution
TableV2
toGlobalTable
.TableV2
that forwards toGlobalTable
and is marked deprecated, to prompt customers to use the new name.Other Information
No response
Acknowledgements
CDK version used
2.87.0
Environment details (OS name and version, etc.)
macOS 14.3
The text was updated successfully, but these errors were encountered: