tpschmidt
tpschmidt

Reputation: 2717

Creating HealthCheck based on other HealthChecks at Route53 with CloudFormation

As the title suggest, I'd like to create a 'combined' health check for all services in a single region. I successfully created the distinct health checks via CloudFormation like this based on the Documentation example:

RegionHealthCheck:
  Type: AWS::Route53::HealthCheck
  Properties:
    HealthCheckConfig:
      Port: 443
      Type: HTTPS
      ResourcePath: <path>
      FullyQualifiedDomainName: <domain>
      RequestInterval: 30
      FailureThreshold: 3
      MeasureLatency: true
      Regions:
        - eu-west-1
        - us-west-1
        - ap-northeast-1
    HealthCheckTags:
      - Key: Environment
        Value: <stage>

Sadly, I can't find any examples on the combined health checks or the attributes which need to be used for the HealthCheckConfig.

Upvotes: 1

Views: 612

Answers (1)

tpschmidt
tpschmidt

Reputation: 2717

I created a combined health check manually via the UI & queried it via the CLI (aws route53 list-health-checks) to find out what the actual attributes are which need to be defined.

CombinedHealthCheck:
  Type: AWS::Route53::HealthCheck
  Properties:
    HealthCheckConfig:
      Type: CALCULATED
      HealthThreshold: 3
      ChildHealthChecks:
        - !Ref <first-healthcheck>
        - !Ref <second-healthcheck>
        - !Ref <third-healthcheck>
    HealthCheckTags:
      - Key: Environment
        Value: <stage>

Still don't know were this is mentioned in the CloudFormation documentation though.

Upvotes: 1

Related Questions