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?
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.
Using an AWS Lambda function with an SQS trigger is serverless, scales automatically with the queue depth, and incurs no cost when no messages are processed, making it the most cost-effective and scalable choice for unpredictable workloads. Option A is wrong because auto scaling based on CPU utilization does not directly correlate with the number of messages in the queue, potentially causing delays or over-provisioning. Option B is wrong because, although a target tracking policy based on SQS queue depth is better, an ECS with Fargate service still requires at least one running task, which may be idle and incur costs. Option C is wrong because Amazon Kinesis Data Streams is designed for real-time streaming, not standard message queuing, and is more expensive and complex than the SQS and Lambda combination.
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
ECS with Fargate may have idle tasks, leading to unnecessary cost.
- ✗
Use an Amazon ECS service with Fargate and a target tracking scaling policy based on SQS queue depth.
Why it's wrong here
This still requires at least one running task, which may be idle.
- ✗
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 is more expensive and designed for real-time streaming, not for standard message queuing.
- ✓
Use an AWS Lambda function with an SQS trigger to process messages and write to DynamoDB.
Why this is correct
Lambda scales to zero when idle and scales up to handle thousands of messages, making it cost-effective and scalable.
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 — 1,660 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.