A company runs a microservice as an AWS Lambda function. The microservice writes to an on-premises SQL database that supports only a limited number of concurrent connections. When Lambda invocation volume increases, the database is overwhelmed and crashes, causing downtime. The company has an AWS Direct Connect link between the VPC and the on-premises datacenter. The company wants to protect the database from being overwhelmed. Which solution satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Send the data to an Amazon Simple Queue Service (Amazon SQS) queue. Have Lambda read from that queue and write to the existing on-premises database. Configure a reserved concurrency limit on the Lambda function that is below the database's maximum supported concurrent connections..
Why this is the answer
The correct solution uses an SQS queue to decouple the Lambda invocation from the database write operation, acting as a buffer. This prevents the database from being overwhelmed during peak Lambda invocation volume. A separate Lambda function can then process messages from the SQS queue at a controlled rate. Configuring a reserved concurrency limit on this processing Lambda function, below the database's maximum supported concurrent connections, ensures that the database is not overloaded. Incorrect options: Migrating to Aurora Serverless is a significant architectural change and doesn't directly address protecting the existing on-premises database. RDS Proxy is for Amazon RDS databases, not on-premises SQL databases. Using SNS to invoke Lambda still directly exposes the database to potential overload if the Lambda concurrency isn't properly managed and throttled, and provisioned concurrency alone doesn't guarantee the database won't be overwhelmed if the provisioned limit is too high or if the database itself is the bottleneck.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed