From 2de7f930f250b806b84abd3fd5062c77ae8304f7 Mon Sep 17 00:00:00 2001 From: Mitch Clarke Date: Wed, 24 Nov 2021 15:33:15 +1100 Subject: [PATCH] Set missing data to notBreaching for APIGW and lambda --- lib/cfnguardian/resources/apigateway.rb | 1 + lib/cfnguardian/resources/lambda.rb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/cfnguardian/resources/apigateway.rb b/lib/cfnguardian/resources/apigateway.rb index 41a38b4..8eabbfb 100644 --- a/lib/cfnguardian/resources/apigateway.rb +++ b/lib/cfnguardian/resources/apigateway.rb @@ -26,6 +26,7 @@ def default_alarms alarm.statistic = 'Average' alarm.threshold = 1000 alarm.evaluation_periods = 2 + alarm.treat_missing_data = 'notBreaching' @alarms.push(alarm) end diff --git a/lib/cfnguardian/resources/lambda.rb b/lib/cfnguardian/resources/lambda.rb index 906b087..3d6bf17 100644 --- a/lib/cfnguardian/resources/lambda.rb +++ b/lib/cfnguardian/resources/lambda.rb @@ -6,18 +6,21 @@ def default_alarms alarm.name = 'LambdaErrors' alarm.metric_name = 'Errors' alarm.threshold = 0.5 + alarm.treat_missing_data = 'notBreaching' @alarms.push(alarm) alarm = CfnGuardian::Models::LambdaAlarm.new(@resource) alarm.name = 'Throttles' alarm.metric_name = 'Throttles' alarm.threshold = 0.5 + alarm.treat_missing_data = 'notBreaching' @alarms.push(alarm) alarm = CfnGuardian::Models::LambdaAlarm.new(@resource) alarm.name = 'DeadLetterErrors' alarm.metric_name = 'DeadLetterErrors' alarm.threshold = 0.5 + alarm.treat_missing_data = 'notBreaching' @alarms.push(alarm) alarm = CfnGuardian::Models::LambdaAlarm.new(@resource)