Courseiva

SOA-C02 Monitoring, Logging, and Remediation Practice Question

A company wants to monitor the number of messages in an Amazon SQS queue and scale the number of EC2 instance consumers based on queue depth. Which combination of AWS services should be used?

⚠ Common exam trap

Candidates often confuse Elastic Load Balancing with queue-based scaling, assuming ELB can scale EC2 instances based on SQS depth, but ELB only handles HTTP/HTTPS traffic distribution and cannot read SQS metrics.

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

✓

Amazon CloudWatch and Amazon EC2 Auto Scaling

Amazon CloudWatch monitors the SQS queue depth (ApproximateNumberOfMessagesVisible metric) and triggers an Amazon EC2 Auto Scaling scaling policy based on a CloudWatch alarm. This allows the number of EC2 consumer instances to dynamically scale in or out in response to the queue depth, ensuring efficient processing without over-provisioning.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Amazon CloudWatch and Amazon EC2 Auto Scaling

    Why this is correct

    Amazon CloudWatch is the correct monitoring service because it publishes the SQS metric ApproximateNumberOfMessagesVisible from the queue, and you can create a CloudWatch alarm on that metric. When the alarm threshold is breached, it triggers an EC2 Auto Scaling policy that adds or removes instances based on the queue depth, directly matching the requirement to scale compute resources with message volume. CloudWatch also retains metric history for troubleshooting and can trigger multiple actions, but the core pairing here is metric-driven auto scaling.

  • ✗

    Amazon Elastic Load Balancing and Amazon EC2 Auto Scaling

    Why it's wrong here

    Elastic Load Balancing is designed to distribute incoming traffic across existing EC2 instances, not to monitor the message backlog in an SQS queue. While ELB also works with Auto Scaling, it uses request count or latency as scaling signals, not queue depth, so it cannot detect a growing SQS backlog. Without a CloudWatch alarm on ApproximateNumberOfMessagesVisible, the Auto Scaling group would remain blind to the actual queue condition, making this combination ineffective for the stated goal.

  • ✗

    Amazon CloudWatch and AWS Lambda

    Why it's wrong here

    AWS Lambda can poll an SQS queue and process messages, but it is a serverless compute service that does not manage or resize EC2 instances. Even though Lambda can be triggered by SQS events and CloudWatch can monitor queue metrics, this architecture would process messages with Lambda functions instead of scaling an EC2 fleet. The requirement specifically asks to adjust the number of EC2 instances based on queue size, which is outside Lambda's scope, so this pair is incorrect.

  • ✗

    AWS CloudTrail and Amazon EventBridge

    Why it's wrong here

    AWS CloudTrail records API calls made to your account, such as CreateQueue or SendMessage, but it does not capture real-time queue metrics like message count. Amazon EventBridge can route events based on rules, but SQS does not emit native events for queue depth; depth is only available as a CloudWatch metric. You would need custom logic to translate CloudTrail logs into actionable scaling events, and even then it would be far less direct and reliable than using CloudWatch alarms with Auto Scaling, so this combination is not appropriate.

About these practice questions

Courseiva writes every SOA-C02 question from scratch — 1,169 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-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 SOA-C02 exam.