Lambda Deployment - Do you have to set the TargetVersion?

1

So I have a CodeBuild project that uploads my latest code to the $latest Lambda version, then publishes a new Lambda version and then does a string replacement on the CodeDeploys appspec file to set the CurrentVersion and the TargetVersion. This works for basic stuff but if say there are 2 people working on the Lambda code and 2 CodeBuilds get kicked off, you will end up with 2 sets of appspec files e.g.

Appspec1: CurrentVersion: 1 TargetVersion: 2

Appspec2: CurrentVersion: 1 TargetVersion: 3

So when Appspec1 is deployed all goes well and the CurrentVersion becomes 2. But then when Appspec2 gets deployed, it will fail because the CurrentVersion is set to 1 instead of the now new version 2.

So how do people get around this? Do you have to set the versions or can CodeDeploy figure it out for itself somehow?

已提问 2 年前112 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容