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회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠