Skip to content

(custom-resource): Support external IDs when assuming a role #34018

@crowecawcaw

Description

@crowecawcaw

Describe the feature

When using the AwsCustomeResource construct, it's possible to pass in a role to be assumed while making the SDK call in order to support cross-account use cases. When assuming a role, STS also support passing in an externalId as a confused deputy control. See these docs for more context. The AwsCustomeResource construct should accept and use an optional external ID when assuming roles.

Use Case

Assuming a role in another account which requires an external ID.

Proposed Solution

I raised a PR to implement the change which I think is straightforward. I couldn't get the integ tests to pass after a couple hours of trying though, so I'm going to move on: https://github.com/aws/aws-cdk/pull/13916/files

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.187

Environment details (OS name and version, etc.)

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/custom-resourcesRelated to AWS CDK Custom Resourceseffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions