Skip to content

Stack: Can't run stack with cross region reference with --exclusively flag #1130

@Cabeda

Description

@Cabeda

Describe the bug

I have a cross region project (using crossRegionReferences) with 3 stacks. Two are deployed in eu-central-1 and the other (cloudfront distribution) is on us-east-1.

If I run cdk deploy -e stack-common it works perfectly. However if I run the cdk deploy -e stack-cloudfront it fails with:

❌ stack-common failed: ToolkitError: Failed to create ChangeSet cdk-deploy-change-set on stack-common: FAILED, Parameters: [ssm:/cdk/exports/stack-common/<resource>] cannot be found.

I know the distribution exists in us-east-1 and I can see the parameter exists. This problem is resolved if I run without the flag --exclusively.

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

Running cdk deploy --exclusively shouldn't report that resource cannot be found

Current Behavior

❌ stack-common failed: ToolkitError: Failed to create ChangeSet cdk-deploy-change-set on stack-common: FAILED, Parameters: [ssm:/cdk/exports/stack-common/] cannot be found. `

Reproduction Steps

cdk deploy -e stack-us-east-1
cdk deploy -e stack-outside us-east-1

Possible Solution

No response

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.221.1

AWS CDK CLI version

2.1029.2

Node.js Version

22.22.1

OS

macos 26.1

Language

Python

Language Version

python 3.12.10

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions