AWS Certified Cloud Practitioner free question 6 / 10 · Domain 3: Cloud Technology and Services
A web application has all of its EC2 instances in the same Availability Zone (AZ). The company wants the application to keep working even if that location fails. Which action matches the EC2 page?
- Spread the instances across multiple AZs so that another AZ takes over if one AZ goes down
- Let AWS choose the AZ for additional instances and place them wherever there is room
- Change to a larger instance type so that a single instance has more headroom
- Add more instances within the same AZ to prepare for the failure of a single instance
Show the answer and explanation
Answer: A
Why this is correct
The page says that if you launch EC2 instances in multiple AZs, you can protect your application from the failure of a single location within a Region. It also explains that you can distribute instances across multiple AZs and design the application so that, if one instance fails, an instance in another AZ can handle requests on its behalf. AZs are multiple isolated locations within a Region, so even if one fails, processing can continue in another.
Why the other options are wrong
"Let AWS choose the AZ for additional instances and place them wherever there is room" … Letting AWS choose the AZ is recommended for the initial launch. For additional instances, the page says to specify the AZ when you need them close to or away from existing instances, and here you need them away.
"Add more instances within the same AZ to prepare for the failure of a single instance" … The page says that even AWS data centers can fail on rare occasions, which affects the instances in the same location. If all instances are in one location and that location fails, none of them is usable, and adding more in the same location suffers the same failure.
"Change to a larger instance type so that a single instance has more headroom" … A larger instance type does not change the location where it runs. The situation the page warns about, in which a failure at one location makes every instance unavailable, remains.
Key point
A subnet fits within one AZ and cannot span AZs. To place instances in multiple AZs, prepare a subnet in each AZ. This is the basic form of task 3.2 of the exam guide, achieving high availability with multiple AZs, and in practice you build it by specifying multiple AZs for an Auto Scaling group or by spreading targets across AZs behind a load balancer.