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?

gefragt vor 2 Jahren252 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen