Q4 — AWS SAA-C03 Ch.17
Question 4 of 89 | ← Chapter 17
Q1304. A company runs a MySQL database on a single Amazon EC2 instance. The company needs to improve availability of the database to prepare for power outages.Which solution will meet this requirement?
- A. Add an Application Load Balancer(ALB) in front of the EC2 instance.
- B. Configure EC2 automatic instance recovery to move the instance to another Availability Zone.
- C. Migrate the MySQL database to Amazon RDS and enable Multi-AZ deployment. ✓
- D. Enable termination protection for the EC2 instance.
Correct Answer: C. Migrate the MySQL database to Amazon RDS and enable Multi-AZ deployment.
Explanation
Let's analyze each option to determine which one meets the requirement of improving the availability of the MySQL database running on a single Amazon EC2 instance in case of power outages:Option A: Add an Application Load Balancer (ALB) in front of the EC2 instance An Application Load Balancer is used to distribute incoming application traffic across multiple targets, such as EC2 instances, containers, or IP addresses. However, in this case, there is only a single EC2 instance running the MySQL database. An ALB does not provide any mechanism to handle power outages or improve the availability of the database itself. It is mainly used for load - balancing traffic among multiple instances to enhance performance and availability in a multi - instance setup. So, this option does not meet the requirement.Option B: Configure EC2 automatic instance recovery to move the instance to another Availability Zone EC2 automatic instance recovery can restart an instance in the same Availability Zone if it becomes impaired due to underlying hardware or software issues. But it does not specifically address the scenario of a power outage. A power outage typically affects an entire Availability Zone or a large part of it. Moving the instance to another Availability Zone is not a native capability of automatic instance recovery. Moreover, even if it could move the instance, there would be a significant downtime during the recovery process, and data consistency might be an issue if the database is in the middle of transactions. So, this option is not an effective solution for improving availability in case of power outages. Option C: Migrate the MySQL database to Amazon RDS and enable Multi - AZ deployment Amazon RDS (Relational Database Service) is a managed database service that makes it easier to set up, operate, and scale a relational database in the cloud. When you enable Multi - AZ deployment for an Amazon RDS database instance, Amazon RDS automatically creates a standby instance in a different Availability Zone. In the event of a power outage or other infrastructure failure in the primary Availability Zone, Amazon RDS automatically fails over to the standby instance with minimal disruption to your applications. This ensures high availability of the database and meets the requirement of preparing for power outages. So, this option is the correct solution.Option D: Enable termination protection for the EC2 instance Termination protection is a feature that prevents an EC2 instance from being accidentally terminated through the Amazon EC2 API, AWS Management Console, or AWS Command Line Interface. While it can prevent unintended termination of the instance, it does not improve the availability of the database in case of a power outage. If a power outage occurs in the Availability Zone where the EC2 instance is located, the instance will still be unavailable until power is restored, and termination protection will not help in this situation. So, this option does not meet the requirement.Therefore, the solution that will meet the requirement is Option C.