Skip to content

Commit

Permalink
Migrate alarms to chat
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrf1 committed May 3, 2024
1 parent 1a7c040 commit ed6814b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
16 changes: 8 additions & 8 deletions cdk/lib/__snapshots__/support-reminders.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exports[`The SupportReminders stack matches the snapshot 1`] = `
{
"Ref": "AWS::AccountId",
},
":contributions-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -121,7 +121,7 @@ exports[`The SupportReminders stack matches the snapshot 1`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -1883,7 +1883,7 @@ exports[`The SupportReminders stack matches the snapshot 1`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -2488,7 +2488,7 @@ exports[`The SupportReminders stack matches the snapshot 1`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -2868,7 +2868,7 @@ exports[`The SupportReminders stack matches the snapshot 2`] = `
{
"Ref": "AWS::AccountId",
},
":contributions-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -2907,7 +2907,7 @@ exports[`The SupportReminders stack matches the snapshot 2`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -4669,7 +4669,7 @@ exports[`The SupportReminders stack matches the snapshot 2`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down Expand Up @@ -5274,7 +5274,7 @@ exports[`The SupportReminders stack matches the snapshot 2`] = `
{
"Ref": "AWS::AccountId",
},
":conversion-dev",
":alarms-handler-topic-PROD",
],
],
},
Expand Down
9 changes: 5 additions & 4 deletions cdk/lib/support-reminders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class SupportReminders extends GuStack {
// ---- Miscellaneous constants ---- //
const app = "support-reminders";
const vpc = GuVpc.fromIdParameter(this, "vpc");
const alarmsTopic = 'alarms-handler-topic-PROD';
const runtime = Runtime.NODEJS_18_X;
const fileName = "support-reminders.zip";
const environment = {
Expand Down Expand Up @@ -84,7 +85,7 @@ export class SupportReminders extends GuStack {
allowHeaders: ["Content-Type"],
},
monitoringConfiguration: {
snsTopicName: "conversion-dev",
snsTopicName: alarmsTopic,
http5xxAlarm: {
tolerated5xxPercentage: 1,
}
Expand Down Expand Up @@ -124,7 +125,7 @@ export class SupportReminders extends GuStack {
},
],
monitoringConfiguration: {
snsTopicName: "conversion-dev",
snsTopicName: alarmsTopic,
toleratedErrorPercentage: 1,
},
...sharedLambdaProps,
Expand All @@ -139,7 +140,7 @@ export class SupportReminders extends GuStack {
},
],
monitoringConfiguration: {
snsTopicName: "conversion-dev",
snsTopicName: alarmsTopic,
toleratedErrorPercentage: 1,
},
...sharedLambdaProps,
Expand All @@ -160,7 +161,7 @@ export class SupportReminders extends GuStack {
evaluationPeriods: 1,
threshold: 8,
actionsEnabled: isProd(),
snsTopicName: "contributions-dev",
snsTopicName: alarmsTopic,
comparisonOperator: ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
metric: new Metric({
metricName: "4XXError",
Expand Down

0 comments on commit ed6814b

Please sign in to comment.