From 8be77f06a5f68d5dd9e53456ac2a87a3b58327ed Mon Sep 17 00:00:00 2001 From: pageinsec <36606674+pageinsec@users.noreply.github.com> Date: Sat, 12 Mar 2022 10:45:03 -0600 Subject: [PATCH] Update to Code.fromAsset --- lib/cloudtrail_partitioner-stack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cloudtrail_partitioner-stack.js b/lib/cloudtrail_partitioner-stack.js index 56a9324..4c8d557 100644 --- a/lib/cloudtrail_partitioner-stack.js +++ b/lib/cloudtrail_partitioner-stack.js @@ -34,7 +34,7 @@ class CloudtrailPartitionerStack extends cdk.Stack { // Create Lambda const partitioner = new lambda.Function(this, "partitioner", { runtime: lambda.Runtime.PYTHON_3_7, - code: lambda.Code.asset("resources/partitioner"), + code: lambda.Code.fromAsset("resources/partitioner"), handler: "main.handler", description: "Partitions the Athena table for CloudTrail", logRetention: logs.RetentionDays.TWO_WEEKS, @@ -136,7 +136,7 @@ class CloudtrailPartitionerStack extends cdk.Stack { // Create Lambda to forward alarms const alarm_forwarder = new lambda.Function(this, "alarm_forwarder", { runtime: lambda.Runtime.PYTHON_3_7, - code: lambda.Code.asset("resources/alarm_forwarder"), + code: lambda.Code.fromAsset("resources/alarm_forwarder"), handler: "main.handler", description: "Forwards alarms from the local SNS to another", logRetention: logs.RetentionDays.TWO_WEEKS,