enum Failover
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Route53.Failover |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsroute53#Failover |
Java | software.amazon.awscdk.services.route53.Failover |
Python | aws_cdk.aws_route53.Failover |
TypeScript (source) | aws-cdk-lib » aws_route53 » Failover |
The failover policy.
Example
declare const myZone: route53.HostedZone;
const healthCheck = new route53.HealthCheck(this, 'HealthCheck', {
type: route53.HealthCheckType.HTTP,
fqdn: 'example.com',
port: 80,
resourcePath: '/health',
failureThreshold: 3,
requestInterval: Duration.seconds(30),
});
new route53.ARecord(this, 'ARecordFailoverPrimary', {
zone: myZone,
target: route53.RecordTarget.fromIpAddresses('1.2.3.4'),
failover: route53.Failover.PRIMARY,
healthCheck,
setIdentifier: 'failover-primary',
});
new route53.ARecord(this, 'ARecordFailoverSecondary', {
zone: myZone,
target: route53.RecordTarget.fromIpAddresses('5.6.7.8'),
failover: route53.Failover.SECONDARY,
setIdentifier: 'failover-secondary',
});
Members
| Name | Description |
|---|---|
| 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. |
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.

.NET
Go
Java
Python
TypeScript (