Skip to main content

Create Route53 HealthChecks to monitor TCP, HTTP, HTTPS endpoints, CloudWatch Alarms and other Route53 HealthChecks.

Project description

GitHub npm (scoped) PyPI Nuget Sonatype Nexus (Releases) GitHub Workflow Status (branch) GitHub release (latest SemVer) Gitpod ready-to-code

AWS CDK Route53 HealthCheck

Create Route53 HealthChecks to monitor TCP, HTTP, HTTPS endpoints, CloudWatch Alarms and other Route53 HealthChecks.

Currently supported types of Route53 HealthChecks:

Easily create a CloudWatch Alarm based on the Route53 HealthCheck:

const healthCheck = new EndpointHealthCheck(stack, "HealthCheck", {
  domainName: "pepperize.com",
});

const alarm = new cloudwatch.Alarm(this, "Alarm", {
  metric: healthCheck.metric(),
  comparisonOperator: cloudwatch.ComparisonOperator.LESS_THAN_THRESHOLD,
  threshold: 1,
  evaluationPeriods: 1,
});

See more options API Reference

Install

TypeScript

npm install @pepperize/cdk-route53-health-check

or

yarn add @pepperize/cdk-route53-health-check

Python

pip install pepperize.cdk-route53-health-check

C# / .Net

dotnet add package Pepperize.CDK.Route53HealthCheck

Java

<dependency>
  <groupId>com.pepperize</groupId>
  <artifactId>cdk-route53-health-check</artifactId>
  <version>${cdkRoute53HealthCheck.version}</version>
</dependency>

Usage

npm install @pepperize/cdk-route53-health-check

See API.md.

Create a Route53 HealthCheck for an endpoint

new EndpointHealthCheck(stack, "HealthCheck", {
  domainName: "pepperize.com",
});

Generates

Resources:
  Type: AWS::Route53::HealthCheck
  Properties:
    HealthCheckConfig:
      FullyQualifiedDomainName: "pepperize.com"
      Port: 443
      Type: "HTTPS"
      EnableSNI: true

See for more options API Reference - EndpointHealthCheckProps

Create a Route53 HealthCheck to monitor other HealthChecks

const endpointHealthCheck = new EndpointHealthCheck(stack, "HealthCheck", {
  domainName: "pepperize.com",
});
new CalculatedHealthCheck(stack, "CalculatedHealthCheck", {
  childHealthChecks: [healthCheck],
});

See for more options API Reference - CalculatedHealthCheckProps

Create a Route53 HealthCheck to monitor CloudWatch Alarms

const alarm = cloudwatch.Alarm.fromAlarmArn(
  stack,
  "Alarm",
  "arn:aws:cloudwatch:us-east-1:123456789012:alarm:any-alarm"
);
new AlarmHealthCheck(stack, "HealthCheck", {
  alarm: alarm,
});

See for more options API Reference - AlarmHealthCheckProps

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pepperize.cdk-route53-health-check-0.0.4.tar.gz (51.6 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page