Skip to content

Commit

Permalink
fix: route53 alarm threshold is inverted
Browse files Browse the repository at this point in the history
# Conflicts:
#	infra/lib/route53-health-checks-stack.ts
  • Loading branch information
wolverian committed Oct 16, 2024
1 parent 368a219 commit f6265fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions infra/lib/route53-health-checks-stack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Stack, StackProps } from "aws-cdk-lib"
import { Metric } from "aws-cdk-lib/aws-cloudwatch"
import { ComparisonOperator, Metric } from "aws-cdk-lib/aws-cloudwatch"
import { SnsAction } from "aws-cdk-lib/aws-cloudwatch-actions"
import { CfnHealthCheck } from "aws-cdk-lib/aws-route53"
import { ITopic } from "aws-cdk-lib/aws-sns"
Expand Down Expand Up @@ -29,7 +29,8 @@ export class Route53HealthChecksStack extends Stack {
},
})
.createAlarm(this, "HealthCheckAlarm", {
threshold: 1,
comparisonOperator: ComparisonOperator.LESS_THAN_THRESHOLD,
threshold: 1, // 1 is healthy, 0 is unhealthy
evaluationPeriods: 1,
})
.addAlarmAction(new SnsAction(props.alarmsSnsTopic))
Expand Down

0 comments on commit f6265fa

Please sign in to comment.