@@ -43,8 +43,10 @@ const addApnsErrorAlarm = (
4343 app : string ,
4444 stage : string ,
4545 metricLambdaName : string ,
46+ threshold : number = 1 ,
4647) => {
4748 const namespace = `Notifications/${ stage } /liveactivities-${ metricLambdaName } ` ;
49+ // APNS traffic is low-volume and bursty.
4850 const period = Duration . minutes ( 5 ) ;
4951 const apns4xx = new Metric ( {
5052 namespace,
@@ -70,7 +72,7 @@ const addApnsErrorAlarm = (
7072 label : 'APNS 4xx + 5xx' ,
7173 period,
7274 } ) ,
73- threshold : 10 ,
75+ threshold,
7476 evaluationPeriods : 1 ,
7577 comparisonOperator : ComparisonOperator . GREATER_THAN_OR_EQUAL_TO_THRESHOLD ,
7678 treatMissingData : TreatMissingData . NOT_BREACHING ,
@@ -301,9 +303,11 @@ export class LiveActivities extends GuStack {
301303 ) ;
302304
303305 //////////// Alarm on APNS 4xx/5xx responses /////////////
304- addApnsErrorAlarm ( this , app , stage , 'broadcast' ) ;
305- addApnsErrorAlarm ( this , app , stage , 'channel-manager' ) ;
306- addApnsErrorAlarm ( this , app , stage , 'channel-cleaner' ) ;
306+ // Fire on any APNS 4xx/5xx error for each low-volume lambda. The alarm self-resolves back to OK
307+ // once errors stop (missing data is treated as not breaching).
308+ addApnsErrorAlarm ( this , app , stage , 'broadcast' , 1 ) ;
309+ addApnsErrorAlarm ( this , app , stage , 'channel-manager' , 1 ) ;
310+ addApnsErrorAlarm ( this , app , stage , 'channel-cleaner' , 1 ) ;
307311
308312 //////////// EVENTBUS INFRASTRUCTURE //////////////
309313
0 commit comments