Skip to content

pipelines: Cannot perform lookup in cross-account nested stack #25171

@growak

Description

@growak

Describe the bug

When a resource is created in a NestedStack in a cross-account pipeline, the Build/Synth phase failed with he following error message: Need to perform AWS calls for account 222222222222, but the current credentials are for 111111111111.

111111111111 is the pipeline account
222222222222 is the target account where the resource should be deployed.

If the same resource is moved to the parent stack everything works.

Expected Behavior

Resource creation should work in NestedStack in cross-account pipelines.

Current Behavior

Resource creation failed in NestedStack in cross-account pipelines.

Reproduction Steps

Create a pipeline.
Create a stage in a different account.
Create a NestedStack inside de stage stack.
Create a resource in the Nested Stack.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.74.0

Framework Version

No response

Node.js Version

v16.20.0

OS

Amazon-Linux 2023

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/pipelinesCDK Pipelines librarybugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions