Skip to content

Commit

Permalink
fix: plat-5879 - correct alarm on lambda worker (#62)
Browse files Browse the repository at this point in the history
* fix: - LambdaWorker - Age alarm on main queue not dlq

* fix: - LambdaWorker - Age alarm on main queue not dlq
  • Loading branch information
malcyL authored Sep 1, 2022
1 parent f4c1ce8 commit 2c59b4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/lambda-worker/lambda-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class LambdaWorker extends cdk.Construct {
dlqMessagesVisable.addOkAction(alarmAction);

// Add an alarm for the age of the oldest message on the LambdaWorkers main trigger queue
const approximateAgeOfOldestMessageMetric = lambdaDLQ
const approximateAgeOfOldestMessageMetric = lambdaQueue
.metric("ApproximateAgeOfOldestMessage")
.with({ statistic: "average", period: cdk.Duration.minutes(1) });
const queueMessagesAge = new cloudwatch.Alarm(
Expand Down
4 changes: 2 additions & 2 deletions test/infra/lambda-worker/lambda-worker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe("LambdaWorker", () => {
Name: "QueueName",
Value: {
"Fn::GetAtt": [
"MyTestLambdaWorkerMyTestLambdaWorkerdlq27BBFD95",
"MyTestLambdaWorkerMyTestLambdaWorkerqueue01D6E79E",
"QueueName",
],
},
Expand Down Expand Up @@ -619,7 +619,7 @@ describe("LambdaWorker", () => {
Name: "QueueName",
Value: {
"Fn::GetAtt": [
"MyTestLambdaWorkerMyTestLambdaWorkerdlq27BBFD95",
"MyTestLambdaWorkerMyTestLambdaWorkerqueue01D6E79E",
"QueueName",
],
},
Expand Down

0 comments on commit 2c59b4f

Please sign in to comment.