Skip to content

Commit f9e65cb

Browse files
authored
chore(toolkit-lib): role duration and session tags don't work (#162)
Fixes another few issues with various publishing jobs: - Role chaining doesn't actually work with a [session duration over one hour.](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html#:~:text=However%2C%20if%20you%20assume%20a%20role%20using%20role%20chaining%20and%20provide%20a%20DurationSeconds%20parameter%20value%20greater%20than%20one%20hour%2C%20the%20operation%20fails.) - Also I realized none of these job actually take that long. This was a copy-and-paste fail from the integ-tests (which do take longer). So let's go back to a shorter duration for these jobs - Use different session names for all jobs - Consistently use `mask-aws-account-id` everywhere. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 9873ff2 commit f9e65cb

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

.github/workflows/release.yml

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

projenrc/adc-publishing.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ export class AdcPublishing extends Component {
5959
uses: 'aws-actions/configure-aws-credentials@v4',
6060
with: {
6161
'aws-region': 'us-east-1',
62-
'role-duration-seconds': 14400,
6362
'role-to-assume': '${{ vars.AWS_ROLE_TO_ASSUME_FOR_ACCOUNT }}',
64-
'role-session-name': 'releasing@aws-cdk-cli',
63+
'role-session-name': 'standalone-release@aws-cdk-cli',
6564
'output-credentials': true,
6665
'mask-aws-account-id': true,
6766
},

projenrc/record-publishing-timestamp.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,8 @@ export class RecordPublishingTimestamp extends Component {
4848
uses: 'aws-actions/configure-aws-credentials@v4',
4949
with: {
5050
'aws-region': 'us-east-1',
51-
'role-duration-seconds': 14400,
5251
'role-to-assume': '${{ vars.AWS_ROLE_TO_ASSUME_FOR_ACCOUNT }}',
53-
'role-session-name': 'releasing@aws-cdk-cli',
54-
'output-credentials': true,
52+
'role-session-name': 'publish-timestamps@aws-cdk-cli',
5553
'mask-aws-account-id': true,
5654
},
5755
},

projenrc/s3-docs-publishing.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export class S3DocsPublishing extends Component {
7171
uses: 'aws-actions/configure-aws-credentials@v4',
7272
with: {
7373
'aws-region': 'us-east-1',
74-
'role-duration-seconds': 14400,
7574
'role-to-assume': '${{ vars.AWS_ROLE_TO_ASSUME_FOR_ACCOUNT }}',
76-
'role-session-name': 'releasing@aws-cdk-cli',
75+
'role-session-name': 's3-docs-publishing@aws-cdk-cli',
76+
'mask-aws-account-id': true,
7777
},
7878
},
7979
{
@@ -82,9 +82,9 @@ export class S3DocsPublishing extends Component {
8282
uses: 'aws-actions/configure-aws-credentials@v4',
8383
with: {
8484
'aws-region': 'us-east-1',
85-
'role-duration-seconds': 14400,
8685
'role-to-assume': this.props.roleToAssume,
87-
'role-session-name': 's3publishing@aws-cdk-cli',
86+
'role-session-name': 's3-docs-publishing@aws-cdk-cli',
87+
'mask-aws-account-id': true,
8888
'role-chaining': true,
8989
},
9090
},

0 commit comments

Comments
 (0)