问题
I'm trying to figure out if there is a way I can package up an aws serverless project in an automated way so that we can split our build and release pipeline up.
Using the dotnet lambda
command line tools, I can see there is a dotnet lambda package
command to package the lambda as a .zip file ready for deployment. But I can't find anything for packaging the whole serverless application up.
Is this possible? If so what commands do I run?
We're running on VSTS for the Build and Release pipelines, however I don't really think I makes any difference as long as I can script it out.
回答1:
Looks like this is possible by packaging up the lambda function into a zip file with the dotnet lambda package
command and then copying across the serverless.template
file to be used later.
dotnet lambda package
Once we've got our *.zip
and our serverless.template
handy we can then run the dotnet lambda deploy-serverless
with the following arguments:
dotnet lambda deploy-serverless --package .\drop\MyApp.zip --template .\drop\serverless.template
来源:https://stackoverflow.com/questions/50449530/how-do-you-package-up-a-visual-studio-aws-serverless-project