Curated articles, resources, tips and trends from the DevOps World.
Summary: This is a summary of an article originally published by Towards the Cloud. Read the full original article here →
Subscribe to my newsletter and never miss my upcoming articles The error Error: Stack "exampleStack1" cannot consume a cross reference from stack "exampleStack2". Cross stack references are only supported for stacks deployed to the same environment or between nested stacks and their parent stack likely happens if you do the following: You try to reference another stack that is in a different AWS region.
You aren't passing region and account values in the env of the StackProps. In order to fix the error in AWS CDK, you need to add the env with region and account parameters to the stack when you create it as shown in the code example below: new exampleStack1( app, 'exampleStack1', { env: { region: 'eu-west-1', account: '012345678910', }, }); }
Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com