0
0
AWScloud~10 mins

Multi-AZ deployment for high availability 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 specify the deployment type for high availability in AWS RDS.

AWS
rds_instance = aws_db_instance(
    identifier='mydb',
    multi_az=[1],
    engine='mysql',
    instance_class='db.t3.medium'
)
Drag options to blanks, or click blank then click option'
A'yes'
BFalse
CTrue
D'multi-az'
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values instead of boolean.
Setting multi_az to False disables high availability.
2fill in blank
medium

Complete the code to create an Auto Scaling group that spans multiple Availability Zones.

AWS
asg = aws_autoscaling_group(
    name='web-asg',
    availability_zones=[1],
    min_size=2,
    max_size=5
)
Drag options to blanks, or click blank then click option'
A['us-east-1a', 'us-east-1b']
B['us-east-1a']
C['us-east-1']
D['us-east-1a', 'us-east-1a']
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one AZ disables Multi-AZ benefits.
Repeating the same AZ twice does not increase availability.
3fill in blank
hard

Fix the error in the subnet configuration to enable Multi-AZ deployment.

AWS
subnet_ids = [
    'subnet-12345',
    [1]
]
Drag options to blanks, or click blank then click option'
A'subnet-67890'
B'subnet-12345a'
C'subnet-12345'
D'subnet-12345b'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same subnet twice.
Using invalid subnet IDs.
4fill in blank
hard

Fill both blanks to configure an Elastic Load Balancer with listeners for HTTP and HTTPS across multiple AZs.

AWS
elb = aws_elb(
    name='my-elb',
    availability_zones=[1],
    listeners=[
        {'protocol': 'HTTP', 'load_balancer_port': 80, 'instance_port': 80},
        {'protocol': 'HTTPS', 'load_balancer_port': 443, 'instance_port': [2]
    ]
)
Drag options to blanks, or click blank then click option'
A['us-west-2a', 'us-west-2b']
B['us-west-2a']
C443
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one AZ disables Multi-AZ benefits.
Setting instance port to 443 for HTTPS listener without proper backend config.
5fill in blank
hard

Fill all three blanks to define a Route 53 health check and failover routing policy for Multi-AZ high availability.

AWS
health_check = aws_route53_health_check(
    fqdn='example.com',
    port=[1],
    type='HTTP',
    resource_path='/',
    failure_threshold=3
)

record = aws_route53_record(
    zone_id='Z123456789',
    name='app.example.com',
    type='A',
    alias=[2],
    set_identifier='primary',
    failover=[3]
)
Drag options to blanks, or click blank then click option'
A80
B{'name': 'elb.amazonaws.com', 'zone_id': 'Z0987654321', 'evaluate_target_health': True}
CPRIMARY
D443
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong port for health check.
Incorrect alias format.
Failover value must be 'PRIMARY' or 'SECONDARY'.