aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
[AWS::DynamoDB::GlobalTable] - [Enhancement] - Support adding replica regions as a separate resource to leverage Fn::ForEach
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::DynamoDB::GlobalTable
### Resource name
_No response_
### Description
It would be incredibly helpful if Global Table replicas could be added via a separate resource, instead of defining them on the GlobalTable resource itself. I liken this to the `AWS::EC2::SecurityGroupIngress`, which can be defined separately from `AWS::EC2::SecurityGroup`. This would open up the possibility of defining replica regions using `Fn::ForEach`, as that intrinsic function can iterate over `CommaDelimitedList` parameters.
Consider this example:
```yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: "Core Dynamo"
Transform: 'AWS::LanguageExtensions'
Parameters:
ReplicaRegions:
Type: "CommaDelimitedList"
Description: "Regions to replicate the DynamoDB table to"
Resources:
Table:
Type: "AWS::DynamoDB::GlobalTable"
Properties:
AttributeDefinitions:
- AttributeName: "_key"
AttributeType: "S"
- AttributeName: "_version"
AttributeType: "N"
KeySchema:
- AttributeName: "_key"
KeyType: "HASH"
- AttributeName: "_version"
KeyType: "RANGE"
BillingMode: "PAY_PER_REQUEST"
Fn::ForEach::Replicas:
- Region
- Ref: ReplicaRegions
- "TableReplica&{Region}":
Type: "AWS::DynamoDB::GlobalTableReplica"
Properties:
Table: !Ref Table
Region: !Sub "${Region}"
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: true
```
Alternately, if `Fn::ForEach` could produce arrays, that would replace this request.
### Other Details
_No response_
Contributor guide
Research direction
The issue identifies no repository files or tests; start with the CloudFormation example using AWS::DynamoDB::GlobalTable and Fn::ForEach. Done would mean either a separate replica resource that supports iterating CommaDelimitedList regions or Fn::ForEach support for producing arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100