question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cdk deploy should support querying stacks by stackName and not just by artifact IDs

See original GitHub issue

I set stackName to HarvestStack, but when I do cdk deploy HarvestStack, it fails

image

image

Reproduction Steps

I am using a nested stack

const networkingStack = new NetworkingStack(app, 'NetworkingStack', {
    env: {
        region: process.env.CDK_DEFAULT_REGION,
        account: settingsForEnv.accountId
    },
    environmentName,
    ...settingsForEnv
})

const harvestStack = new HarvestStack(networkingStack, 'HarvestStack', {
    stackName: 'HarvestStack',
    env: {
        region: process.env.CDK_DEFAULT_REGION,
        account: settingsForEnv.accountId
    },
    environmentName,
    ...settingsForEnv,
    vpc: networkingStack.vpc,
    certificate: networkingStack.certificate,
    hostedZone: networkingStack.hostedZone,
    alarmSNSTopic: networkingStack.alarmSNSTopic
})

Error Log

Environment

  • CLI Version : 1.44.0 (build 1cd832b)
  • Framework Version: 1.44.0 (build 1cd832b)
  • Node.js Version: v12.6
  • OS : MacOS
  • Language (Version): Typescript

Other


This is 🐛 Bug Report

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eladbcommented, Jun 8, 2020

cdk deploy accepts the artifact ID, not the stack name. In your case it would be cdk deploy NetworkingStackHarvestStack58EA1BE6.

We could add some kind of query mechanism that will allow you to query the stack by name instead of artifact ID.

I am repurposing this issue and reassigning to @shivlaks who owns our CLI.

0reactions
peterwoodworthcommented, Jun 3, 2022

feature request should be left open

Read more comments on GitHub >

github_iconTop Results From Across the Web

Stacks - AWS Cloud Development Kit (AWS CDK) v2
Nested stacks are bound to their parent stack and are not treated as independent deployment artifacts. They aren't listed by cdk list ,...
Read more >
Setup and Deployment in AWS Cloud Development Kit
The final step to deploy our stacks to CloudFormation is calling a syntax of cdk deploy {StackName} –toolkit-stack-name Test. If you only have ......
Read more >
cloudassemblyschema - Go Packages
It is produced as part of the cdk synth command, or the app.synth() ... If this value is not set, the bootstrap stack...
Read more >
Troubleshooting AWS CodePipeline Artifacts - Stelligent
One of the key benefits of CodePipeline is that you don't need to install, ... aws cloudformation create-stack --stack-name YOURSTACKNAME ...
Read more >
deploy — AWS CLI 2.9.6 Command Reference - Amazon AWS
deploy --template-file <value> --stack-name <value> [--s3-bucket <value>] ... The ID of an AWS KMS key that the command uses to encrypt artifacts that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found