How do I get the CDK generated by "dotnet aws deploy"?

0

I've created a blazorwasm project using the following commands:

dotnet tool install -g aws.deploy.tools
mkdir temp
cd temp
dotnet new blazorwasm
dotnet aws deploy

When I run the final command I can see that it's using CDK to deploy the application but it appears to write this to a temporary directory. Is there a way to save the CDK so I can modify it and extend the project later?

asked a year ago244 views
1 Answer
0

You can use dotnet aws deployment-project generate to persist the CDK project from one of the built-in recipes:

dotnet aws deployment-project generate --output ../CustomDeploymentProject --project-display-name "Custom deployment project"

You can then modify the persisted CDK project, perhaps to add new resources and options, or to streamline the built-in recipe. You may want to check it into source control alongside your application code.

Then to deploy an application using the custom CDK project, you can use the --deployment-project switch on dotnet aws deploy:

dotnet aws deploy --deploy-project ../CustomDeploymentProject

Or, if the custom deployment project is located anywhere beneath the solution (.sln) of the project you are deploying, the deployment tool will detect it automatically.

Some more resources:

profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions