Courseiva
Monitoring and Logging →easyMultiple Choice

DOP-C02 Monitoring and Logging Practice Question

Exhibit

Refer to the exhibit.

```
2023-03-15T10:00:00.000Z	ERROR	Invoke Error	{ "errorMessage": "Timeout", "errorType": "FunctionTimeout" }
2023-03-15T10:00:00.500Z	END	RequestId: abc123
2023-03-15T10:00:00.500Z	REPORT	RequestId: abc123	Duration: 3000.00 ms	Billed Duration: 3000 ms	Memory Size: 128 MB	Max Memory Used: 64 MB	Init Duration: 200.00 ms	
```

A Lambda function is timing out. The log above shows a recent invocation. What is the most likely cause?

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

✓

The function timeout is set too low.

The log shows the function timed out at 3000 ms, which is the default Lambda timeout (3 seconds). The correct answer is D because the timeout value is set too low, causing the function to be terminated before it can complete. Option A is incorrect because memory usage is only 64 MB out of 128 MB, so insufficient memory is not the issue. Option B is incorrect because there is only one invocation shown; frequent invocations would cause throttling, not a timeout. Option C is incorrect because the init duration is normal (e.g., 2.34 ms), indicating that a cold start is not the cause; cold starts increase latency but do not cause timeouts if the function runs within the timeout limit.

Answer analysis

Option-by-option breakdown

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

  • ✗

    The function is running out of memory.

    Why it's wrong here

    A Lambda timeout is not caused by memory pressure. The log shows Max memory used is only 64 MB, which is far below the typical 128 MB allocated memory, so the function is nowhere near exhausting its allotted memory. Memory exhaustion would produce a different error, such as an out-of-memory kill, not a 'Task timed out' message at 3000 ms.

  • ✗

    The function is being invoked too frequently.

    Why it's wrong here

    Invocation frequency affects how Lambda scales or throttles but does not influence how long a single execution runs. The log shows only one invocation, and a high request rate would cause '429 Too Many Requests' or throttling errors before the code runs, not a 3000 ms duration hitting the timeout limit. Therefore this option cannot explain the timeout.

  • ✗

    The function is experiencing a cold start.

    Why it's wrong here

    A cold start adds initialization latency before the handler begins, and the log's Init duration of 200 ms is well within normal range. Cold starts do not extend the handler's Duration value; the 3000 ms Duration is the handler execution time that exceeded the configured timeout. Since the Init duration is small, a cold start is not the culprit.

  • ✓

    The function timeout is set too low.

    Why this is correct

    The correct diagnosis is that the function's timeout setting is too low. The 3000 ms Duration exactly matches the default Lambda timeout of 3 seconds, and the 'Task timed out' error means Lambda terminated the handler at its configured limit. Raising the timeout, after reviewing the code for inefficiencies, would allow the function to complete successfully.

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 DOP-C02 question is part of Courseiva's 1,298-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 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.