fix (aws/lambda): add support for adding layers to lambda functions
MODIFY
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/description/CreateLambdaFunctionConfigurationDescription.java
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/description/CreateLambdaFunctionConfigurationDescription.java
@@ -36,6 +36,7 @@ public class CreateLambdaFunctionConfigurationDescription
Integer timeout;
List<String> subnetIds;
List<String> securityGroupIds;
+ List<String> layers;
Map<String, String> envVariables;
Map<String, String> tags;
DeadLetterConfig deadLetterConfig;

MODIFY
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/description/CreateLambdaFunctionDescription.java
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/description/CreateLambdaFunctionDescription.java
@@ -34,6 +34,7 @@ public class CreateLambdaFunctionDescription extends AbstractLambdaFunctionDescr
String role;
String runtime;
String appName;
+ List<String> layers;
Integer memorySize;
Integer timeout;

MODIFY
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/ops/CreateLambdaAtomicOperation.java
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/ops/CreateLambdaAtomicOperation.java
@@ -81,6 +81,7 @@ public class CreateLambdaAtomicOperation
request.setRole(description.getRole());
request.setRuntime(description.getRuntime());
request.setTimeout(description.getTimeout());
+ request.setLayers(description.getLayers());
request.setCode(code);
request.setTags(objTag);

MODIFY
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/ops/UpdateLambdaConfigurationAtomicOperation.java
clouddriver-lambda/src/main/java/com/netflix/spinnaker/clouddriver/lambda/deploy/ops/UpdateLambdaConfigurationAtomicOperation.java
@@ -63,6 +63,7 @@ public class UpdateLambdaConfigurationAtomicOperation
.withRole(description.getRole())
.withTimeout(description.getTimeout())
.withDeadLetterConfig(description.getDeadLetterConfig())
+ .withLayers(description.getLayers())
.withVpcConfig(
new VpcConfig()
.withSecurityGroupIds(description.getSecurityGroupIds())

fix (aws/lambda): add support for adding layers to lambda functions (#4952)

Co-authored-by: smaniyedath <shyam_maniyedath@intuit.com>