aws-dynamodb: TableV2 should be called GlobalTable
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The `TableV2` construct should be named `GlobalTable` 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 creates `AWS::DynamoDB::GlobalTable` resources. This is _especially_ confusing because it is not mentioned at all in [the documentation for the construct](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.TableV2.html).
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](https://aws.amazon.com/blogs/devops/a-new-and-improved-aws-cdk-construct-for-amazon-dynamodb-tables/).
### Proposed Solution
* Rename `TableV2` to `GlobalTable`.
* Create a new `TableV2` that forwards to `GlobalTable` and is marked deprecated, to prompt customers to use the new name.
### Other Information
_No response_
### Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.87.0
### Environment details (OS name and version, etc.)
macOS 14.3
Contributor guide
Research direction
Start at the aws_dynamodb.TableV2 construct entry point and trace its public export and construct documentation. Done means GlobalTable is the primary name, TableV2 forwards to it with a deprecation notice, and the documentation explains the mapping to AWS::DynamoDB::GlobalTable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100