Courseiva

CV0-004 Cloud Architecture and Design Practice Question

A cloud engineer is designing a serverless application that processes messages from an Amazon SQS queue. The application must scale automatically based on the number of messages in the queue and must handle failures gracefully by retrying failed messages. Which AWS service should the engineer use to run the application code?

⚠ Common exam trap

The trap here is assuming that any compute service can easily integrate with SQS; only Lambda has native SQS event source mapping that handles scaling and retries automatically.

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

✓

AWS Lambda with an SQS trigger

AWS Lambda with an SQS trigger is the most suitable because it natively integrates with SQS, automatically scales based on the number of messages, and provides built-in retry and dead-letter queue support. Other options require manual scaling configuration or additional components to achieve the same level of integration and simplicity.

Answer analysis

Option-by-option breakdown

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

  • ✗

    AWS Step Functions with a state machine

    Why it's wrong here

    AWS Step Functions can orchestrate workflows and integrate with SQS, but it is not designed to automatically scale based on queue depth. It is better for coordinating multiple steps and managing state, not for high-throughput, event-driven processing that scales with queue size. It would require additional components to achieve the required scaling.

  • ✓

    AWS Lambda with an SQS trigger

    Why this is correct

    AWS Lambda supports SQS as an event source. When configured, Lambda automatically polls the queue and invokes the function with batches of messages. It scales based on the number of messages, and failed invocations can be retried or sent to a dead-letter queue. This meets the requirements for automatic scaling and graceful failure handling.

  • ✗

    Amazon EC2 Auto Scaling group with a custom worker

    Why it's wrong here

    An EC2 Auto Scaling group can scale based on queue depth using custom CloudWatch metrics, but it requires managing servers, configuring scaling policies, and implementing retry logic manually. It is not serverless and does not provide built-in integration with SQS for automatic scaling and failure handling as seamlessly as Lambda.

  • ✗

    AWS Fargate with an ECS service

    Why it's wrong here

    AWS Fargate runs containers without managing servers, but it does not natively integrate with SQS as an event source. You would need to write code to poll the queue and manage scaling based on queue depth, which adds complexity. It is not as straightforward as using a service that directly supports SQS triggers.

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 CV0-004 question is part of Courseiva's 834-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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.