diff --git a/lib/lambda-worker/lambda-worker.ts b/lib/lambda-worker/lambda-worker.ts index 304352bd..6937dd0b 100644 --- a/lib/lambda-worker/lambda-worker.ts +++ b/lib/lambda-worker/lambda-worker.ts @@ -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( diff --git a/test/infra/lambda-worker/lambda-worker.test.ts b/test/infra/lambda-worker/lambda-worker.test.ts index d93a26c8..82ac1c63 100644 --- a/test/infra/lambda-worker/lambda-worker.test.ts +++ b/test/infra/lambda-worker/lambda-worker.test.ts @@ -183,7 +183,7 @@ describe("LambdaWorker", () => { Name: "QueueName", Value: { "Fn::GetAtt": [ - "MyTestLambdaWorkerMyTestLambdaWorkerdlq27BBFD95", + "MyTestLambdaWorkerMyTestLambdaWorkerqueue01D6E79E", "QueueName", ], }, @@ -619,7 +619,7 @@ describe("LambdaWorker", () => { Name: "QueueName", Value: { "Fn::GetAtt": [ - "MyTestLambdaWorkerMyTestLambdaWorkerdlq27BBFD95", + "MyTestLambdaWorkerMyTestLambdaWorkerqueue01D6E79E", "QueueName", ], },