0
0
AWScloud~10 mins

Failover routing for disaster recovery in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Route 53 failover routing policy for disaster recovery.

AWS
resource "aws_route53_record" "failover" {
  zone_id = var.zone_id
  name    = "app.example.com"
  type    = "A"
  ttl     = 60
  set_identifier = "Primary"
  failover = "[1]"
  records = [aws_instance.primary.public_ip]
}
Drag options to blanks, or click blank then click option'
ASECONDARY
BPRIMARY
CACTIVE
DPASSIVE
Attempts:
3 left
💡 Hint
Common Mistakes
Using SECONDARY for the primary record.
Using ACTIVE or PASSIVE which are invalid values.
2fill in blank
medium

Complete the code to set the failover routing policy for the secondary record.

AWS
resource "aws_route53_record" "failover_secondary" {
  zone_id = var.zone_id
  name    = "app.example.com"
  type    = "A"
  ttl     = 60
  set_identifier = "Secondary"
  failover = "[1]"
  records = [aws_instance.secondary.public_ip]
}
Drag options to blanks, or click blank then click option'
APASSIVE
BPRIMARY
CACTIVE
DSECONDARY
Attempts:
3 left
💡 Hint
Common Mistakes
Using PRIMARY for the secondary record.
Using ACTIVE or PASSIVE which are invalid values.
3fill in blank
hard

Fix the error in the health check configuration for failover routing.

AWS
resource "aws_route53_health_check" "primary_health" {
  fqdn              = "app.example.com"
  port              = 80
  type              = "[1]"
  resource_path     = "/health"
  failure_threshold = 3
}
Drag options to blanks, or click blank then click option'
AHTTPS
BTCP
CHTTP
DPING
Attempts:
3 left
💡 Hint
Common Mistakes
Using TCP which only checks port connectivity.
Using PING which is not suitable for HTTP health checks.
4fill in blank
hard

Fill both blanks to correctly associate the health check with the Route 53 record and enable failover.

AWS
resource "aws_route53_record" "failover_primary" {
  zone_id = var.zone_id
  name    = "app.example.com"
  type    = "A"
  ttl     = 60
  set_identifier = "Primary"
  failover = "[1]"
  health_check_id = aws_route53_health_check.primary_health.[2]
  records = [aws_instance.primary.public_ip]
}
Drag options to blanks, or click blank then click option'
APRIMARY
Bid
Carn
DSECONDARY
Attempts:
3 left
💡 Hint
Common Mistakes
Using SECONDARY for failover on primary record.
Using 'arn' instead of 'id' for health_check_id.
5fill in blank
hard

Fill all three blanks to create a secondary failover record with health check association.

AWS
resource "aws_route53_record" "failover_secondary" {
  zone_id = var.zone_id
  name    = "app.example.com"
  type    = "A"
  ttl     = 60
  set_identifier = "Secondary"
  failover = "[1]"
  health_check_id = aws_route53_health_check.secondary_health.[2]
  records = [aws_instance.secondary.[3]]
}
Drag options to blanks, or click blank then click option'
ASECONDARY
Bid
Cpublic_ip
Dprivate_ip
Attempts:
3 left
💡 Hint
Common Mistakes
Using PRIMARY for secondary failover.
Using 'arn' instead of 'id' for health_check_id.
Using private_ip instead of public_ip.