Skip to content

feat(custom-resources): support external IDs when assuming a role with a custom resource#33965

Closed
crowecawcaw wants to merge 1 commit intoaws:mainfrom
crowecawcaw:custom-resource-external-id
Closed

feat(custom-resources): support external IDs when assuming a role with a custom resource#33965
crowecawcaw wants to merge 1 commit intoaws:mainfrom
crowecawcaw:custom-resource-external-id

Conversation

@crowecawcaw
Copy link
Copy Markdown
Contributor

Reason for this change

We want to use the AwsCustomConstruct for making calls in another account while assuming a role. As a security mitigation, our cross account role requires an external ID. This change allows the AwsCustomConstruct to optionally use external IDs.

Description of changes

Add assumedRoleExternalId as an optional AwsCustomConstruct parameter and use it when making cross-account calls.

Describe any new or updated permissions being added

None

Description of how you validated changes

Unit tests and snapshot comparisions.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team March 28, 2025 15:18
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Mar 28, 2025
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@crowecawcaw crowecawcaw changed the title feat: support external IDs when assuming a role with a custom resource feat(custom-resources): support external IDs when assuming a role with a custom resource Mar 28, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 28, 2025 16:03

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@crowecawcaw crowecawcaw force-pushed the custom-resource-external-id branch from be0c4d4 to 7201c02 Compare April 1, 2025 12:17
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Features must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7201c02
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@crowecawcaw crowecawcaw closed this Apr 1, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants