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.

Allow an app alias to be set in cdk.json

See original GitHub issue

I did try and search for open issues on this. My apologies if one already exists. I would like the cdk.json file to allow for multiple app entries. Currently it defaults to only “app” in cdk.json and if I want to override that, I need to remember a long string: cdk --app "npx ts-node bin/hello-cdk.ts" ls. I propose that a custom alias can be set in the cdk.json file.

Use Case

This would allow me to separate and process my stacks using a memorable alias vs the whole command.

Proposed Solution

I propose that an app alias can also be specified in cdk.json. As an example:

  "app": "npx ts-node bin/cdk.ts",
  "helloWorld": "npx ts-node bin/hello-cdk.ts"

which would allow me to call cdk --app helloWorld ls.


  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:23
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

eladbcommented, Oct 17, 2019

I like this idea!

DJAlPeecommented, Jul 24, 2020

I have another use case for a feature like that:

For rolling out a static (SPA) website, we need to create resources in two regions (ACM certs / Lambda@Edge in us-east-1 for CloudFront and everything else like S3, etc. in our region). Because CDK (and CloudFormation) can’t pass references across stacks, which are across different regions, I would split these resources into two different apps and handle passing the references somehow else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App — AWS Cloud Development Kit 2.54.0 documentation
A construct which represents an entire CDK app. This construct is normally the root of the construct tree. You would normally define an...
Read more >
API Reference | projen
Projenrc, Sets up a project to use JSON for projenrc. ... AwsCdkTypeScriptApp, AWS CDK app in TypeScript. awscdk.CdkConfig, Represents cdk.json file.
Read more >
How to migrate CDK v1 to CDK v2 in 10 minuets
Theoretically, you just need to remove all the feature flags put on cdk.json in v1, and can check whether you need the new...
Read more >
UpdateAlias - Amazon Lambda - 亚马逊云科技
PUT /2015-03-31/functions/ FunctionName /aliases/ Name HTTP/1.1 Content-type: application/json { "Description": " string ", "FunctionVersion": " string " ...
Read more >
AWS CDK Toolkit - npm
CDK Toolkit, the command line tool for CDK apps. ... The following shows a sample cdk.json where the outputsFile key is set to...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found