Failover

class aws_cdk.aws_route53.Failover(*values)

Bases: Enum

The failover policy.

See:

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-failover.html

ExampleMetadata:

infused

Example:

# my_zone: route53.HostedZone


health_check = route53.HealthCheck(self, "HealthCheck",
    type=route53.HealthCheckType.HTTP,
    fqdn="example.com",
    port=80,
    resource_path="/health",
    failure_threshold=3,
    request_interval=Duration.seconds(30)
)

route53.ARecord(self, "ARecordFailoverPrimary",
    zone=my_zone,
    target=route53.RecordTarget.from_ip_addresses("1.2.3.4"),
    failover=route53.Failover.PRIMARY,
    health_check=health_check,
    set_identifier="failover-primary"
)

route53.ARecord(self, "ARecordFailoverSecondary",
    zone=my_zone,
    target=route53.RecordTarget.from_ip_addresses("5.6.7.8"),
    failover=route53.Failover.SECONDARY,
    set_identifier="failover-secondary"
)

Attributes

PRIMARY

The primary resource record set determines how Route 53 responds to DNS queries when the primary resource is healthy.

SECONDARY

The secondary resource record set determines how Route 53 responds to DNS queries when the primary resource is unhealthy.