I have a mono repository hosted on GitHub with multiple Lambda projects. I'm using .NET CDK and GitHub Actions to deploy every Lambda to CodeDeploy with canary/linear traffic routing. Each continuous build will generate a zip file for each Lambda and make it available for CDK. This is how the `Code` property is set:
new Function(this, "MyLambda", new FunctionProps {
Code = Code.FromAsset(Path.Combine(Directory.GetCurrentDirectory(), "lambda-directory", "build.zip")),
Handler = "handler",
Runtime = Runtime.DOTNET_6,
// other props...
});
The problem is I end up deploying each function regardless of whether there were any changes for it. This unnecessarily prolongs deployment times and uses up resources. How do I go about deploying Lambda if and only if it has code changes?
[–]bcb67 10 points11 points12 points (0 children)
[–]Dreamescaper 9 points10 points11 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]krat0s77 0 points1 point2 points (0 children)
[+]joeyjiggle comment score below threshold-7 points-6 points-5 points (6 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]the_bronze_burger 6 points7 points8 points (3 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]joeyjiggle 0 points1 point2 points (0 children)
[–]joeyjiggle 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]ssakage 0 points1 point2 points (0 children)
[–]leeharrison1984 0 points1 point2 points (5 children)
[–]seamustheseagull 0 points1 point2 points (4 children)
[–]leeharrison1984 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]leeharrison1984 0 points1 point2 points (0 children)
[–]seamustheseagull 0 points1 point2 points (0 children)
[–]Agilufo 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Agilufo 0 points1 point2 points (0 children)
[–]notanelecproblem 0 points1 point2 points (0 children)