Courseiva
Monitoring and Logging →hardMultiple Choice

DOP-C02 Monitoring and Logging Practice Question

A DevOps engineer is troubleshooting an AWS Lambda function that processes messages from an Amazon SQS queue. The function is invoked successfully, but it frequently times out after 15 seconds. The function's CloudWatch Logs show that the timeout occurs while the function is making an HTTP request to an external API. The function's reserved concurrency is set to 5, and the SQS queue has a visibility timeout of 30 seconds. Which change would MOST effectively reduce the number of timeouts?

⚠ Common exam trap

The trap is that candidates focus on SQS visibility timeout or concurrency, but the symptom (timeout during an HTTP call) points squarely at the Lambda execution timeout, which is the only setting that directly controls how long the function may run.

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

✓

Increase the Lambda function's timeout to 30 seconds.

The function times out at 15 seconds while waiting on an external HTTP call, so the most direct fix is to raise the Lambda timeout to 30 seconds, giving the external API enough time to respond. The SQS visibility timeout (30s) already exceeds the current Lambda timeout, so it is not the bottleneck. Increasing the timeout is the change that most directly reduces the number of timeouts.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Increase the Lambda function's timeout to 30 seconds.

    Why this is correct

    The Lambda service enforces a configurable timeout that caps how long a single invocation can run, with a default of 3 seconds. If the function calls a downstream HTTP endpoint that is slower than the remaining execution time, the runtime terminates the invocation and returns a timeout error to the caller. Raising the timeout to 30 seconds grants the HTTP request enough time to return a response, directly resolving the symptom described in the troubleshooting scenario.

  • ✗

    Increase the SQS queue's visibility timeout to 60 seconds.

    Why it's wrong here

    The SQS visibility timeout controls how long a message is hidden from other consumers after it has been polled, not how long Lambda is allowed to execute. If the Lambda function itself times out, the function does not delete the message, and the message becomes visible again only after the visibility timeout expires; adjusting it up to 60 seconds simply postpones retries. This does not fix the underlying timeout because Lambda's own configured timeout still applies to every invocation.

  • ✗

    Decrease the SQS batch size to 1.

    Why it's wrong here

    Batch size determines the maximum number of records that Lambda receives per invocation from an SQS event source. Reducing the batch size to 1 changes the grouping of messages, but every individual invocation still has the same configured timeout, so a message that needs more than the current timeout to be processed will fail identically. In fact, smaller batches increase the number of invocations and can add overhead, while doing nothing to extend the time available for a single record.

  • ✗

    Increase the Lambda function's reserved concurrency to 10.

    Why it's wrong here

    Reserved concurrency caps the number of simultaneous executions allocated to a function, preventing it from being throttled by the AWS region's default concurrency pool. However, concurrency is a measure of parallelism, not execution duration; raising it to 10 allows more invocations to run side by side but does not extend the clock for any single invocation. If an individual request exceeds the function's timeout, that invocation still fails regardless of how many other invocations are permitted.

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

Courseiva writes every DOP-C02 question from scratch — 1,298 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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