Skip to content

Commit

Permalink
fix caching alarm and insights layer naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 committed Oct 30, 2024
1 parent 085fdf8 commit 804d9d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/stacks/routing-lambda-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class RoutingLambdaStack extends cdk.NestedStack {
layers: [
aws_lambda.LayerVersion.fromLayerVersionArn(
this,
'InsightsLayer',
'CachingInsightsLayer',
`arn:aws:lambda:${region}:580247275435:layer:LambdaInsightsExtension:14`
),
],
Expand Down Expand Up @@ -223,15 +223,15 @@ export class RoutingLambdaStack extends cdk.NestedStack {
layers: [
aws_lambda.LayerVersion.fromLayerVersionArn(
this,
'CachingInsightsLayer',
'InsightsLayer',
`arn:aws:lambda:${region}:580247275435:layer:LambdaInsightsExtension:14`
),
],
tracing: aws_lambda.Tracing.ACTIVE,
logRetention: RetentionDays.TWO_WEEKS,
})

const cachingLambdaAlarmErrorRate = new aws_cloudwatch.Alarm(this, 'RoutingAPI-LambdaErrorRate', {
const cachingLambdaAlarmErrorRate = new aws_cloudwatch.Alarm(this, 'CachingRoutingAPI-LambdaErrorRate', {
metric: new aws_cloudwatch.MathExpression({
expression: 'errors / invocations',
usingMetrics: {
Expand All @@ -248,7 +248,7 @@ export class RoutingLambdaStack extends cdk.NestedStack {
threshold: 0.05,
evaluationPeriods: 3,
})
const lambdaAlarmErrorRate = new aws_cloudwatch.Alarm(this, 'CachingRoutingAPI-LambdaErrorRate', {
const lambdaAlarmErrorRate = new aws_cloudwatch.Alarm(this, 'RoutingAPI-LambdaErrorRate', {
metric: new aws_cloudwatch.MathExpression({
expression: 'errors / invocations',
usingMetrics: {
Expand Down

0 comments on commit 804d9d3

Please sign in to comment.