Skip to content

Commit d580853

Browse files
authoredMar 3, 2025··
fix(s3): cannot deploy multiple replication source buckets (under feature flag) (#33360)
### Issue # (if applicable) Closes #33355. ### Reason for this change We cannot deploy multiple source buckets for object replication due to the explicitly set replication role name. ### Description of changes Set replication role name by `PhysicalName.GENERATE_IF_NEEDED`. ### Describe any new or updated permissions being added None ### Description of how you validated changes Update both unit and integ test. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a96b0f1 commit d580853

File tree

28 files changed

+37862
-708
lines changed

28 files changed

+37862
-708
lines changed
 

‎packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-cross-account-replication.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as cdk from 'aws-cdk-lib';
22
import { AwsApiCall, IntegTest } from '@aws-cdk/integ-tests-alpha';
33
import * as s3 from 'aws-cdk-lib/aws-s3';
44
import { Construct } from 'constructs';
5+
import { SET_UNIQUE_REPLICATION_ROLE_NAME } from 'aws-cdk-lib/cx-api';
56

67
/**
78
* Notes on how to run this integ test
@@ -28,7 +29,11 @@ import { Construct } from 'constructs';
2829
* - `yarn integ aws-s3/test/integ.bucket-cross-account-replication.js --profiles cross-account`
2930
* */
3031

31-
const app = new cdk.App();
32+
const app = new cdk.App({
33+
postCliContext: {
34+
[SET_UNIQUE_REPLICATION_ROLE_NAME]: false,
35+
},
36+
});
3237

3338
const account = process.env.CDK_INTEG_ACCOUNT || '123456789012';
3439
const crossAccount = process.env.CDK_INTEG_CROSS_ACCOUNT || '234567890123';

‎packages/@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-replication-multiple-sources.js.snapshot/BucketReplicationMultipleSourcesTestStack.assets.json

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.