Decoupling Lambda Ingestion and Aurora Writes with SQS
A company is designing an application. The application uses an AWS Lambda function to receive information through Amazon API Gateway and to store the information in an Amazon Aurora PostgreSQL database. During the proof-of-concept stage, the company has to increase the Lambda quotas significantly to handle the high volumes of data that the company needs to load into the database. A solutions architect must recommend a new design to improve scalability and minimize the configuration effort. Which solution will meet these requirements?
Community Insight
The question tests loosely coupled, bufferable serverless design; the trap is picking SNS or a full platform rewrite when only SQS provides pull-based queuing that decouples ingest rate from Lambda concurrency.
The scenario asks how to absorb high-volume data ingestion into Aurora PostgreSQL without inflating AWS Lambda concurrency quotas, while keeping configuration effort low. Splitting ingestion and database loading into two Lambda functions joined by an Amazon SQS queue is the design that meets both scalability and minimal-effort requirements.
Option C is the most common wrong pick because two Lambda functions wired with SNS looks nearly identical to the correct architecture, but SNS pushes messages immediately to the second function and reproduces the same concurrency bottleneck under load.
Community Discussion (44 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D splits the workload into a receiver Lambda and a loader Lambda connected through an Amazon SQS queue, so API Gateway traffic lands in a durable buffer rather than directly against Lambda concurrency limits. Because SQS is a pull-based event source, the second function scales out according to the queue depth and drains messages at a rate Lambda can actually service, which smooths spikes instead of forcing the company to raise quotas. This preserves the serverless footprint already in place, requires only a queue and an event source mapping, and therefore minimizes configuration effort. The pattern also introduces built-in buffering, retries, and visibility-timeout handling for free, directly satisfying both the scalability and low-effort requirements. It also aligns with the well-architected guidance on loose coupling and elastically scalable compute.Why the Other Options Are Wrong
Option A abandons Lambda for Apache Tomcat on Amazon EC2 with JDBC, which demands load balancers, auto scaling groups, patching, and capacity planning — the opposite of minimizing configuration effort — and it also tends to run slower than Lambda for bursty ingestion. Option B swaps Aurora PostgreSQL for DynamoDB with a DAX cluster, a full data-model and application rewrite that does nothing to relieve the Lambda quota pressure identified as the actual problem. Option C uses the same two-function shape as the correct answer but joins them with Amazon SNS, a push mechanism that forces the second function to accept messages immediately and can still overwhelm its concurrency, reproducing the bottleneck. Only SQS decouples the producer rate from the consumer rate, so messages wait in the queue until capacity exists.Community Comment Notes
Community consensus overwhelmingly favors D, with 123jhl0 observing that "A - refactoring can be a solution, BUT requires a LOT of effort" and that SNS "would notify the 2nd Lambda function... provoking the same bottleneck." PaulGa captured the decisive distinction precisely: "SNS is Push Mechanism" while "SQS is Pull Mechanism," which lets the loader function consume the next message only when ready. tgrgopi added that the queue supplies "automatic buffering, smoothing of traffic spikes, and built-in retry/backoff semantics with minimal configuration," while PhucVuu stressed that Aurora-to-DynamoDB migration is a large-effort detour. JohnZh and mohamedsambo both pointed out the underlying mechanics — once concurrency approaches the 1,000-request regional default, a queue is what throttles and stores data for later consumption.Official Reference
Exam Strategy
On SAA-C03, treat phrases like 'minimize configuration effort' and 'improve scalability' as signals for serverless, loosely coupled patterns; when two options differ only by SNS versus SQS, choose SQS for any work that must be consumed at a controlled rate. Eliminate answers that require a database migration or an EC2 re-platform unless the question explicitly asks to leave serverless.
Frequently Asked Questions
Why is SNS wrong when both options C and D use two Lambda functions?
SNS pushes each message to the second Lambda immediately, so the loader still faces the full ingest rate and can hit concurrency limits. SQS lets the loader pull messages only when capacity is available, creating a real buffer.
Why can't we just migrate Aurora to DynamoDB with DAX to fix the Lambda quota problem?
The bottleneck is Lambda concurrency during ingestion, not database throughput. Switching to DynamoDB would force a NoSQL data-model rewrite and application changes, adding large effort without removing the quota constraint.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →