AWS PublishVersion与无服务器
我有一个相当大的项目,我使用Windows终端使用无服务器框架将其部署到AWS(一次合在一起)。
我会这样做:
serverless deploy -s integration
这将占用我所有的lambdas并部署它们。我的问题是我需要使用AWS的版本操作,并且我不知道该怎么做。
进行无服务器部署后,我是否需要打开AWS CLI控制台并为我已经使用无服务器部署的每个Lambda运行类似的操作?
version=$(aws lambda publish-version --function-name test_lambda --description "updated via cli" --region eu-west-1| jq '.Version')
我只是对如何结合部署Lambdas的两种方式感到困惑。
I have a pretty big project that I use Serverless Framework to deploy to AWS (a few lambdas together at a time) using Windows Terminal.
I would do:
serverless deploy -s integration
and it will take all of my lambdas and deploy them. My problem is that I need to use the versioning of AWS, and I don't know how to do it.
After I do the serverless deploy, do I need to open the AWS CLI console and run something like this for each lambda that I already deployed using serverless?
version=$(aws lambda publish-version --function-name test_lambda --description "updated via cli" --region eu-west-1| jq '.Version')
I'm just confused on how to combine the 2 ways of deploying lambdas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,使用无服务器框架部署的所有功能均已版本。您还可以通过设置将其禁用或明确打开:
请记住,旧版本不会自动删除,因此,如果您要保留一些先前部署的版本,则可能需要使用插件为 https://github.com/claygregory/serverless/serverless-prune-plugin-plugin
by default, all functions deployed with Serverless Framework are versioned. You can also disable it or turn it on explicitly by setting:
Please keep in mind that the old versions are not removed automatically, so if you want to keep e.g. only a few previously deployed versions, you might need to use a plugin as https://github.com/claygregory/serverless-prune-plugin