Limiting Cross-stack References in CDK
Several years ago I wrote CloudFormation Tips and Tricks, in which I gave the advice to “use outputs lavishly, exports sparingly.” The reason is that when you export a value from one stack and import it into another you bind those stacks tightly together, and can’t change that exported value. For example, you might create one stack with an ECS task definition, and then in a second stack create a Lambda and an EventBridge rule that triggers it when the…