Courseiva
Design for New Solutions →hardMultiple Choice

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 consists of three microservices: Service A, Service B, and Service C. Service A receives HTTP requests from an Application Load Balancer and sends messages to an Amazon SQS queue. Service B polls the SQS queue and processes the messages, storing results in Amazon DynamoDB. Service C reads from DynamoDB and sends notifications via Amazon SNS. The company expects variable traffic and wants to minimize costs. During a load test, the team observes that Service B is not scaling fast enough, causing the SQS queue to grow. The team also notices that Service C is idle most of the time. Which solution should the company implement to improve scaling and reduce costs?

⚠ Common exam trap

Many exam-takers choose CPU-based scaling (Option B) because it is familiar, but they fail to recognize that queue depth is a more direct and responsive metric for scaling message-processing services, and they overlook the cost savings of replacing an idle Fargate service with a Lambda function triggered by DynamoDB Streams.

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

✓

Configure Service B with a target tracking scaling policy based on the SQS queue backlog and convert Service C to an AWS Lambda function triggered by DynamoDB Streams.

It addresses both scaling and cost issues: Service B's scaling is improved by using a target tracking scaling policy based on the SQS queue backlog (ApproximateNumberOfMessagesVisible), which directly correlates to the work demand, ensuring faster and more precise scaling. Converting Service C to a Lambda function triggered by DynamoDB Streams eliminates idle compute costs from a constantly running Fargate service, as Lambda only runs when new data appears in DynamoDB, reducing costs significantly.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use AWS Lambda with Provisioned Concurrency for Service B and keep Service C as a Fargate service.

    Why it's wrong here

    Provisioned Concurrency pre-warms a fixed number of Lambda execution environments, so Service B still scales on a pre-provisioned basis rather than matching SQS queue depth, and Service C remains an idle Fargate task paying for unused capacity. It is tempting because Lambda suits spiky workloads, but provisioned capacity defeats that elasticity.

  • ✗

    Use a step scaling policy for Service B based on CPU utilization and keep Service C as is.

    Why it's wrong here

    CPU utilisation lags queue growth because Service B's bottleneck is message polling, not compute, so step scaling reacts too slowly; Service C still runs continuously despite being idle. It is tempting because step scaling with CloudWatch alarms is the standard ECS pattern, but it cannot track SQS backlog depth.

  • ✓

    Configure Service B with a target tracking scaling policy based on the SQS queue backlog and convert Service C to an AWS Lambda function triggered by DynamoDB Streams.

    Why this is correct

    Target tracking on SQS queue backlog scales Service B directly against the growing queue, matching the observed constraint. Converting Service C to Lambda removes idle Fargate cost, since DynamoDB Streams invokes it only on change, satisfying the variable-traffic, cost-minimisation requirement.

  • ✗

    Increase the number of ECS tasks for Service B manually and use a scheduled scaling policy for Service C.

    Why it's wrong here

    Manual task increases cannot follow variable traffic and scheduled scaling for Service C still pays for idle Fargate capacity outside peak windows. It is tempting because scheduled scaling suits predictable diurnal patterns, but this workload's demand is variable and queue-driven, not timetable-driven.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This SAP-C02 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.