diff --git a/cdk/lib/__snapshots__/snyk-tag-monitor.test.ts.snap b/cdk/lib/__snapshots__/snyk-tag-monitor.test.ts.snap index 0be96ba..19d25bc 100644 --- a/cdk/lib/__snapshots__/snyk-tag-monitor.test.ts.snap +++ b/cdk/lib/__snapshots__/snyk-tag-monitor.test.ts.snap @@ -408,7 +408,25 @@ exports[`The SnykTagMonitor stack matches the snapshot 1`] = ` }, "Type": "AWS::CloudWatch::Alarm", }, - "snyktagmonitorsnyktagmonitorrate1day0AllowEventRuleSnykTagMonitorsnyktagmonitorAE4097CFB7932521": { + "snyktagmonitorsnyktagmonitorrate7days06190F24C": { + "Properties": { + "ScheduleExpression": "rate(7 days)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::GetAtt": [ + "snyktagmonitor01C2294D", + "Arn", + ], + }, + "Id": "Target0", + }, + ], + }, + "Type": "AWS::Events::Rule", + }, + "snyktagmonitorsnyktagmonitorrate7days0AllowEventRuleSnykTagMonitorsnyktagmonitorAE4097CF885D65C7": { "Properties": { "Action": "lambda:InvokeFunction", "FunctionName": { @@ -420,31 +438,13 @@ exports[`The SnykTagMonitor stack matches the snapshot 1`] = ` "Principal": "events.amazonaws.com", "SourceArn": { "Fn::GetAtt": [ - "snyktagmonitorsnyktagmonitorrate1day0D20FBF83", + "snyktagmonitorsnyktagmonitorrate7days06190F24C", "Arn", ], }, }, "Type": "AWS::Lambda::Permission", }, - "snyktagmonitorsnyktagmonitorrate1day0D20FBF83": { - "Properties": { - "ScheduleExpression": "rate(1 day)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "snyktagmonitor01C2294D", - "Arn", - ], - }, - "Id": "Target0", - }, - ], - }, - "Type": "AWS::Events::Rule", - }, "snyktagmonitortopicF2FA58D7": { "Properties": { "Tags": [ diff --git a/cdk/lib/snyk-tag-monitor.ts b/cdk/lib/snyk-tag-monitor.ts index 9ae3e74..ca9321f 100644 --- a/cdk/lib/snyk-tag-monitor.ts +++ b/cdk/lib/snyk-tag-monitor.ts @@ -47,7 +47,7 @@ export class SnykTagMonitor extends GuStack { const tagAlarm = new GuAlarm(this, `${app}-alarm`, tagAlarmProps) const lambdaProps: GuScheduledLambdaProps = { - rules: [{ schedule: Schedule.rate(Duration.days(1)) }], + rules: [{ schedule: Schedule.rate(Duration.days(7)) }], monitoringConfiguration: { toleratedErrorPercentage: 50, snsTopicName: topic.topicName,