Allow an app alias to be set in cdk.json
See original GitHub issueI 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
.
Other
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:5 (2 by maintainers)
Top 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 >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
I like this idea!
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.