(s3tables-alpha): support ReplicationConfiguration for TableBucket
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 12.9k
- Forks
- 4.6k
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 74
Beschreibung
Describe the feature
Add support for S3 Tables Bucket replication by exposing the L1
AWS::S3Tables::TableBucket ReplicationConfiguration property through the
L2 TableBucket construct in @aws-cdk/aws-s3tables-alpha.
Related docs:
- https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-tables-replication.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3tables-tablebucket-replicationconfiguration.html
Use Case
We want to replicate S3 Tables across Regions / accounts for DR and
cross-account analytics. The L1 already accepts ReplicationConfiguration,
but the L2 TableBucket has no first-class API, so users have to drop down
to the CfnTableBucket escape hatch today.
Proposed Solution
Add two flat props to TableBucketProps (mirroring the pattern used by
aws-s3's replicationRole / replicationRules):
export interface TableBucketProps {
// ... existing props
/**
* Destination table buckets to replicate to.
*
* @default - No replication
*/
readonly replicationDestinations?: ITableBucket[];
/**
* The role to be used by the replication.
*
* When setting this property, you must also set `replicationDestinations`.
*
* @default - a new role will be created.
*/
readonly replicationRole?: iam.IRole;
}
// Usage
const dest = TableBucket.fromTableBucketArn(this, 'Dest', 'arn:...');
new TableBucket(this, 'Source', {
tableBucketName: 'src',
replicationDestinations: [dest],
});
When replicationRole is omitted the construct creates a role with
least-privilege replication permissions and an s3tables.amazonaws.com trust
policy with aws:SourceAccount / aws:SourceArn confused-deputy conditions.
Notes:
- The CFN
ReplicationConfigurationwraps destinations in arules: []
array, but a rule currently has no fields other thandestinations, so
flattening to a singlereplicationDestinations: ITableBucket[]avoids a
speculative abstraction. If AWS later adds per-rule settings (filter,
priority, etc.), we can evolve the API — breaking changes are acceptable
in the alpha package. - Escape hatch remains available via
node.defaultChildon the underlying
CfnTableBucket.
Other Information
- L1 types (
CfnTableBucket.ReplicationConfigurationPropertyetc.) already
exist inaws-cdk-lib/aws-s3tables, so no L1 work is needed. - Additive props, no breaking change.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
2.250.0
AWS CDK CLI version
2.1030.0
Environment details (OS name and version, etc.)
macOS 14.6 (Darwin 23.6.0)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Einstiegspunkte TableBucket und TableBucketProps in @aws-cdk/aws-s3tables-alpha zu lesen, und vergleiche sie dann mit den vorhandenen CfnTableBucket.ReplicationConfigurationProperty-Typen und dem aws-s3-Muster replicationRole/replicationRules. Überprüfe die Dokumentation zur Replikation von AWS S3 Tables und definiere „fertig“ als offengelegte destination- und role-props, korrekte L1-Synthese sowie die erforderlichen Rollenberechtigungen und Vertrauensbedingungen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, typescript
- Bereich
- cloud, infrastructure
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100