AWS Certified Database – Specialty — Question 250
A company has a web application that uses Amazon API Gateway to route HTTPS requests to AWS Lambda functions. The application uses an Amazon Aurora MySQL database for its data storage. The application has experienced unpredictable surges in traffic that overwhelm the database with too many connection requests. The company needs to implement a scalable solution that is more resilient to database failures as quickly as possible.
Which solution will meet these requirements MOST cost-effectively?
Answer options
- A. Migrate the Aurora MySQL database to Amazon Aurora Serverless by restoring a snapshot. Change the endpoint in the Lambda functions to use the new database.
- B. Migrate the Aurora MySQL database to Amazon DynamoDB tables by using AWS Database Migration Service (AWS DMS). Change the endpoint in the Lambda functions to use the new database.
- C. Create an Amazon EventBridge rule that invokes a Lambda function. Code the function to iterate over all existing connections and to call MySQL queries to end any connections in the sleep state.
- D. Increase the instance class for the Aurora database with more memory. Set a larger value for the max_connections parameter.
Correct answer: D
Explanation
The correct answer is D because increasing the instance class provides more resources and enhances the capacity to handle concurrent connections, which directly addresses the issue of overwhelming connection requests. Options A and B involve migrations that may not be as cost-effective or quick to implement given the current needs, while option C does not resolve the underlying issue of connection limits.