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?

已提問 2 年前檢視次數 252 次
1 個回答
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
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南