How do you package up a visual studio aws serverless project?

↘锁芯ラ 提交于 2019-12-06 07:24:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!