From 7383f24e27cba25a39c8d80b54b929d64f2cb1f6 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 9 Oct 2024 18:36:12 -0400 Subject: [PATCH] chore: make patching more frequent (#732) * chore: make patching more frequent Signed-off-by: Justin Alvarez * update test Signed-off-by: Justin Alvarez --------- Signed-off-by: Justin Alvarez --- lib/ssm-patching-stack.ts | 6 +++--- test/ssm-patching-stack.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ssm-patching-stack.ts b/lib/ssm-patching-stack.ts index 7ec4ec2..4f8eefe 100644 --- a/lib/ssm-patching-stack.ts +++ b/lib/ssm-patching-stack.ts @@ -13,8 +13,8 @@ export class SSMPatchingStack extends cdk.Stack { allowUnassociatedTargets: false, cutoff: 0, duration: 2, - // Every Sunday at 3 AM - schedule: 'cron(0 3 ? * SUN *)' + // Every day at 8 AM UTC + schedule: 'cron(0 8 ? * * *)' }); const maintenanceTarget = new CfnMaintenanceWindowTarget(this, 'MaintenanceWindowTarget', { @@ -49,7 +49,7 @@ export class SSMPatchingStack extends cdk.Stack { documentVersion: '$LATEST' } }, - maxErrors: '0', + maxErrors: '100%', maxConcurrency: '1' }); } diff --git a/test/ssm-patching-stack.test.ts b/test/ssm-patching-stack.test.ts index b105977..ab20106 100644 --- a/test/ssm-patching-stack.test.ts +++ b/test/ssm-patching-stack.test.ts @@ -15,7 +15,7 @@ describe('SSMPatchingStack', () => { Cutoff: 0, Duration: 2, Name: 'Patching-Window', - Schedule: 'cron(0 3 ? * SUN *)' + Schedule: 'cron(0 8 ? * * *)' } }); @@ -38,7 +38,7 @@ describe('SSMPatchingStack', () => { template.hasResource('AWS::SSM::MaintenanceWindowTask', { Properties: { MaxConcurrency: '1', - MaxErrors: '0', + MaxErrors: '100%', Name: 'Patch-Task', Priority: 1, Targets: [