(DynamoDB): Enabling ContributorInsights (boolean flag) does not reflect in child/related resources (like GSIs and replication regions)
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
CDK's support for [DynamoDB's ContributorInsights feature](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/contributorinsights_HowItWorks.html) is enabled via a simple boolean flag: [Table#contributorInsightsEnabled](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.Table.html#contributorinsightsenabled).
However, turning on this single boolean field does not turn on ContributorInsights in child/related resources, such as:
* GSIs (and [GlobalSecondaryIndexProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.GlobalSecondaryIndexProps.html) also does not have a way of enabling it).
* Replica tables created in other regions (using the [Table#replicationRegions](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.Table.html#replicationregions) property).
### Use Case
If `ContributorInsights` is enabled via a single boolean field (like it is right now), it yields a nice simple user-experience. But I expect it to also enable it on related resources.
Otherwise, I expect to have other ways of enabling it on such child/related resources directly, but there does not appear to be any way to do this (aside from a CustomResource).
### Proposed Solution
Either:
* Turn on `ContributorInsights` on all child resources (part of the `Table`)
* or offer options to toggle them on per child resource (like `GSI` and per `replicatedRegion`).
### Other
Original discussion and Pull-Request:
* https://github.com/aws/aws-cdk/issues/11626
* https://github.com/aws/aws-cdk/pull/14742/
* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start with Table#contributorInsightsEnabled, GlobalSecondaryIndexProps, and the replicationRegions behavior described in the issue. Review issue #11626 and pull request #14742 for prior design discussion. Done means ContributorInsights is consistently handled for related resources, or those resources expose explicit controls as proposed.
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
- 35/100