SAP-C02 Design for New Solutions Practice Question
A company is designing a new application that will run on Amazon ECS with Fargate. The application must process messages from an Amazon SQS queue and store results in an Amazon DynamoDB table. The workload is unpredictable and can scale from 0 to thousands of messages per second. What is the MOST cost-effective and scalable architecture?
⚠ Common exam trap
SAP-C02 often tests the misconception that ECS/Fargate with auto scaling is always the most cost-effective for variable workloads, when in fact Lambda's scale-to-zero and per-invocation pricing make it the better choice for unpredictable, queue-driven processing.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use an AWS Lambda function with an SQS trigger to process messages and write to DynamoDB.
AWS Lambda with an SQS event source mapping is the most cost-effective and scalable choice because Lambda scales automatically and nearly instantly with the number of messages, charging only per invocation and execution time — with no cost when idle. It natively integrates with SQS (polling in batches, handling visibility timeouts, and deleting messages on success) and can write to DynamoDB with built-in retry and DLQ support. For a workload that can drop to zero, Lambda avoids the baseline cost of running an always-on ECS service. ECS with Fargate, by contrast, requires at least one running task (or complex scaling to zero) and adds management overhead without a cost advantage at this scale.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Run an Amazon ECS service with Fargate that polls the SQS queue and writes to DynamoDB. Configure auto scaling based on CPU utilization.
Why it's wrong here
CPU utilisation does not track SQS backlog, so scaling lags when thousands of messages arrive and tasks sit idle when the queue is empty, wasting Fargate spend. It is tempting because CPU target tracking suits steady request-driven services, where compute load correlates directly with demand.
- ✗
Use an Amazon ECS service with Fargate and a target tracking scaling policy based on SQS queue depth.
Why it's wrong here
Queue depth scaling responds to backlog, but the option omits the requirement to scale to zero; a Fargate service with a minimum task count keeps paying for idle capacity. It is tempting because target tracking on SQS ApproximateNumberOfMessages is the standard pattern for variable workloads with continuous traffic.
- ✗
Use Amazon Kinesis Data Streams to ingest messages and an AWS Lambda function to process and write to DynamoDB.
Why it's wrong here
Kinesis Data Streams requires provisioned or on-demand shards and does not consume an existing SQS queue, adding cost and re-architecture. It is tempting because Lambda with Kinesis scales per shard and suits ordered stream processing, which would be correct if the source were a stream rather than SQS.
- ✓
Use an AWS Lambda function with an SQS trigger to process messages and write to DynamoDB.
Why this is correct
Lambda with an SQS trigger scales automatically from zero to thousands of messages per second and charges only per invocation, eliminating idle Fargate task costs. It writes directly to DynamoDB, making it the most cost-effective and scalable choice for unpredictable workloads.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 984 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.