Skip to content

Commit

Permalink
fix(s3): cannot deploy multiple replication source buckets (under fea…
Browse files Browse the repository at this point in the history
…ture 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*
  • Loading branch information
badmintoncryer authored Mar 3, 2025
1 parent a96b0f1 commit d580853
Show file tree
Hide file tree
Showing 28 changed files with 37,862 additions and 708 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as cdk from 'aws-cdk-lib';
import { AwsApiCall, IntegTest } from '@aws-cdk/integ-tests-alpha';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
import { SET_UNIQUE_REPLICATION_ROLE_NAME } from 'aws-cdk-lib/cx-api';

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

const app = new cdk.App();
const app = new cdk.App({
postCliContext: {
[SET_UNIQUE_REPLICATION_ROLE_NAME]: false,
},
});

const account = process.env.CDK_INTEG_ACCOUNT || '123456789012';
const crossAccount = process.env.CDK_INTEG_CROSS_ACCOUNT || '234567890123';
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d580853

Please sign in to comment.