SOA-C02 Monitoring, Logging, and Remediation Practice Question
A company uses AWS Lambda functions that process data from an Amazon SQS queue. The Lambda function is failing intermittently due to timeouts. The SysOps administrator needs to be notified immediately when the function times out. What is the most efficient way to achieve this?
⚠ Common exam trap
A common mix-up: candidates assume they can catch a timeout exception inside the function code (Option A) or that Lambda destinations (Option D) are a catch-all for all errors, when in fact they only apply to specific invocation types and do not cover all timeout scenarios.
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
✓
Create a CloudWatch alarm on the Lambda Errors metric that sends an SNS notification
A CloudWatch alarm on the Lambda Errors metric directly monitors function invocations that result in errors, including timeouts. When the alarm state changes to ALARM, it can immediately trigger an SNS notification, providing the fastest and most efficient notification mechanism without requiring code changes or additional infrastructure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Modify the Lambda function to catch the timeout exception and log it to CloudWatch Logs
Why it's wrong here
Adding a try/catch around your handler to capture the timeout and write it to CloudWatch Logs only creates a passive record—there is no mechanism to proactively page or notify an operator. Lambda already emits a timeout as an Errors metric, so waiting for someone to read logs is not an automated alerting strategy. It also fails to address the operational need for immediate incident response, and logging alone does not satisfy the requirement for real-time notification.
- ✓
Create a CloudWatch alarm on the Lambda Errors metric that sends an SNS notification
Why this is correct
A CloudWatch alarm on the AWS/Lambda Errors metric directly monitors every failed invocation, including timeouts, and transitions to ALARM when the error count exceeds the configured threshold. The alarm then publishes to an SNS topic, which can deliver email, SMS, or trigger a webhook or incident-management tool. This is the native, low-latency path because the metric is emitted automatically by the Lambda service without any code changes or log processing.
- ✗
Set up a CloudWatch Logs subscription filter to send error logs to an SNS topic
Why it's wrong here
A subscription filter on the Lambda function's log group can only stream log events to destinations like Lambda, Kinesis, or OpenSearch—there is no native SNS subscription destination, so you would need to insert an intermediary Lambda or Kinesis consumer to publish to SNS. Even where an intermediary handles forwarding, this path depends on the function writing a log line containing the relevant error pattern and adds latency, complexity, and an extra failure point compared to simply alarming on the Errors metric. It might work in a pinch, but it is a brittle workaround rather than the recommended monitoring pattern.
- ✗
Configure an Amazon SNS topic as a Lambda destination for the function
Why it's wrong here
Lambda Destinations (including an SNS topic for failure events) apply only to asynchronous invocations or to stream-based event source mappings like Kinesis and DynamoDB, not to SQS poll-based event source mappings. When Lambda consumes from an SQS queue via an event source mapping, it invokes the function synchronously with the queue messages, so the destination configuration is ignored. Configuring an SNS destination therefore will not fire on SQS-triggered timeouts; you would need to configure a Dead-Letter Queue or rely on the Errors metric instead.
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
One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.