diff --git a/cdk/lib/__snapshots__/batch-email-sender.test.ts.snap b/cdk/lib/__snapshots__/batch-email-sender.test.ts.snap index 26e24c704b..f347b2c78e 100644 --- a/cdk/lib/__snapshots__/batch-email-sender.test.ts.snap +++ b/cdk/lib/__snapshots__/batch-email-sender.test.ts.snap @@ -697,8 +697,8 @@ exports[`The BatchEmailSender stack matches the snapshot 1`] = ` ], }, ], - "AlarmDescription": "API responded with 5xx to Salesforce meaning some emails failed to send. Logs at /aws/lambda/batch-email-sender-PROD repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", - "AlarmName": "URGENT 9-5 - PROD: Failed to send email triggered by Salesforce - 5XXError (CDK)", + "AlarmDescription": "API responded with 5xx to Salesforce meaning some emails failed to send. Logs at /aws/lambda/batch-email-sender-CODE repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", + "AlarmName": "URGENT 9-5 - CODE: Failed to send email triggered by Salesforce - 5XXError (CDK)", "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { @@ -768,8 +768,8 @@ exports[`The BatchEmailSender stack matches the snapshot 1`] = ` ], }, ], - "AlarmDescription": "Lambda crashed unexpectedely meaning email message sent from Salesforce to the Service Layer could not be processed. Logs at /aws/lambda/batch-email-sender-PROD repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", - "AlarmName": "URGENT 9-5 - PROD: Failed to send email triggered by Salesforce - Lambda crash (CDK)", + "AlarmDescription": "Lambda crashed unexpectedely meaning email message sent from Salesforce to the Service Layer could not be processed. Logs at /aws/lambda/batch-email-sender-CODE repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", + "AlarmName": "URGENT 9-5 - CODE: Failed to send email triggered by Salesforce - Lambda crash (CDK)", "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Dimensions": [ { diff --git a/cdk/lib/batch-email-sender.ts b/cdk/lib/batch-email-sender.ts index 3ad0211625..b166796961 100644 --- a/cdk/lib/batch-email-sender.ts +++ b/cdk/lib/batch-email-sender.ts @@ -88,8 +88,8 @@ export class BatchEmailSender extends GuStack { // ---- Alarms ---- // new GuAlarm(this, 'FailedEmailApiAlarm', { app, - alarmName: "URGENT 9-5 - PROD: Failed to send email triggered by Salesforce - 5XXError (CDK)", - alarmDescription: "API responded with 5xx to Salesforce meaning some emails failed to send. Logs at /aws/lambda/batch-email-sender-PROD repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", + alarmName: `URGENT 9-5 - ${this.stage}: Failed to send email triggered by Salesforce - 5XXError (CDK)`, + alarmDescription: `API responded with 5xx to Salesforce meaning some emails failed to send. Logs at /aws/lambda/batch-email-sender-${this.stage} repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/`, evaluationPeriods: 1, threshold: 1, actionsEnabled: isProd, @@ -108,8 +108,8 @@ export class BatchEmailSender extends GuStack { new GuAlarm(this, 'FailedEmailLambdaAlarm', { app, - alarmName: "URGENT 9-5 - PROD: Failed to send email triggered by Salesforce - Lambda crash (CDK)", - alarmDescription: "Lambda crashed unexpectedely meaning email message sent from Salesforce to the Service Layer could not be processed. Logs at /aws/lambda/batch-email-sender-PROD repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/", + alarmName: `URGENT 9-5 - ${this.stage}: Failed to send email triggered by Salesforce - Lambda crash (CDK)`, + alarmDescription: `Lambda crashed unexpectedely meaning email message sent from Salesforce to the Service Layer could not be processed. Logs at /aws/lambda/batch-email-sender-${this.stage} repo at https://github.com/guardian/support-service-lambdas/blob/main/handlers/batch-email-sender/`, evaluationPeriods: 1, threshold: 1, actionsEnabled: isProd,