Cdk synth doesn't work with multiple stacks
See original GitHub issueNote: for support questions, please first reference our documentation, then use Stackoverflow. This repository’s issues are intended for feature requests and bug reports.
-
I’m submitting a …
- 🪲 bug report
- 🚀 feature request
- 📚 construct library gap
- ☎️ security issue or vulnerability => Please see policy
- ❓ support request => Please see note at the top of this template.
-
What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce
from aws_cdk import (
aws_s3,
core
)
class BucketStackOne(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs) -> None:
super().__init__(app, id, **kwargs)
aws_s3.Bucket(scope=self, id='Bucket1')
class BucketStackTwo(core.Stack):
def __init__(self, app: core.App, id: str, **kwargs) -> None:
super().__init__(app, id, **kwargs)
aws_s3.Bucket(scope=self, id='Bucket2')
app = core.App()
BucketStackOne(
app=app,
id='stack1',
env={
'region': os.environ['CDK_DEFAULT_REGION'],
'account': os.environ['CDK_DEFAULT_ACCOUNT']
})
BucketStackTwo(
app=app,
id='stack2,
env={
'region': os.environ['CDK_DEFAULT_REGION'],
'account': os.environ['CDK_DEFAULT_ACCOUNT']
})
app.synth()
cdk synth produces no output
- What is the expected behavior (or behavior of feature suggested)?
list down synthesized templates from all stacks
- What is the motivation / use case for changing the behavior or adding this feature?
to see synthesized templates before deploying
-
Please tell us about your environment:
- CDK CLI Version:0.36.0 (build 6d38487)
- Module Version: 0.36.0
- OS: [Ubuntu]
- Language: [Python ]
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Create an app with multiple stacks - AWS Documentation
Stacks are the unit of deployment: each stack in an app can be synthesized and deployed individually using the cdk deploy command. This...
Read more >cdk synth with stack name provided still synths all the stacks in ...
The synth command synthesizes a CloudFormation template from your CDK code, and per CDK docs, it will always run the whole app and...
Read more >@seed-run/aws-cdk - npm
If there are multiple stacks in your application, cdk synth will synthesize the cloud assembly to cdk.out . $ # Synthesize cloud assembly...
Read more >Hey CDK, how do cross-account deployments work?
The AWS CDK makes it easy to deploy your application, regardless if it consists of multiple stacks that are deployed in multiple accounts ......
Read more >CDK Shorts #2 – Parallel Deployments | Rehan van der Merwe
The Problem. You have to wait a long time when you have a large CDK project that needs to deploy many stacks. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@blake-enyart -e option
I am running cdk synth in a project with cdk pipelines and it only seems to be synthesising the devops pipeline stack and not the stacks that it deploys. I’m looking in the cdk.out folder. I have been able to deploy and I have on previous occasion seen the other stack files in this folder but something is stopping it from generating them now when I run cdk synth. Their names are printed when I run cdk ls and no errors are returned. If I run cdk synth specific_stack_name it will print to terminal but not produce a file in cdk.out.
My bad: they end up in an assembly folder within cdk.out. I think I saw them in the root before because I had deployed outside of cdk pipelines perhaps.