Q54 — AWS SAA-C03 Ch.15

Question 54 of 100 | ← Chapter 15

Q1154. A company uses an Amazon EC2 Auto Scaling group to host an API. The EC2 instances are in a target group that is associated with an Application Load Balancer (ALB). The company stores data in an Amazon Aurora PostgreSQL database.The API has a weekly maintenance window. The company must ensure that the API returns a static maintenance response during the weekly maintenance window.Which solution will meet this requirement with the LEAST operational overhead?

Correct Answer: C. Create a listener rule on the ALB to return a maintenance response when the path on a request matches a wildcard. Set the rule priority to one. Perform the maintenance. When the maintenance window is finished,delete the listener rule.

Explanation

To meet the requirement of returning a static maintenance response during a weekly maintenance window with the least operational overhead, let's evaluate the options:Key Requirements:Return a static maintenance response during the maintenance window. Least operational overhead (simplicity and ease of management).No code changes or complex logic in the API or database.Option Analysis:A. Create a table in Aurora PostgreSQL to store a maintenance flag. Configure the API to query the flag and return a maintenance response if set.This requires:Database schema changes (adding a table).API code changes to query the database.Manual or scripted updates to the flag during maintenance. Operational overhead: High (database and API modifications). B. Create an Amazon SQS queue. Subscribe EC2 instances to the queue. Publish messages to trigger maintenance mode.This requires:SQS queue setup and instance subscription.API code changes to listen for SQS messages and return a maintenance response.Manual or scripted message publishing during maintenance.Operational overhead: High (queue management and API changes). C. Create a listener rule on the ALB to return a maintenance response when the path matches a wildcard. Set the rule priority to one. Delete the rule after maintenance.This requires:Creating an ALB listener rule that returns a fixed response (e.g., a maintenance page). Setting the rule priority to ensure it takes precedence during maintenance.Deleting the rule after maintenance (or disabling it).Operational overhead: Low (no code changes, just ALB configuration). This is the simplest solution. D. Create an Amazon SNS topic. Subscribe EC2 instances to the topic. Publish messages to trigger maintenance mode.This requires:SNS topic setup and instance subscription.API code changes to listen for SNS messages and return a maintenance response.Manual or scripted message publishing during maintenance.Operational overhead: High (SNS management and API changes).Best Solution (Least Operational Overhead):C. Create a listener rule on the ALB to return a maintenance response when the path on a request matches a wildcard. Set the rule priority to one. Perform the maintenance. When the maintenance window is finished, delete the listener rule.This solution:Uses the ALB's built-in capabilities to return a fixed response during maintenance.Requires no code changes (just ALB configuration).Is straightforward to enable/disable (create/delete the rule). Is the most lightweight and operationally efficient option.Final Answer:C. Create a listener rule on the ALB to return a maintenance response when the path on a request matches a wildcard. Set the rule priority to one. Perform the maintenance. When the maintenance window is finished, delete the listener rule.