DVA-C02 Development with AWS Services Practice Question
Network Topology
Refer to the exhibit. A developer invoked a Lambda function and received the response shown. What does the response indicate?
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 was invoked but returned an error.
The response includes a 'FunctionError' field with value 'Unhandled' and an 'error' object, indicating that the Lambda function was invoked successfully (StatusCode 200) but the function itself encountered an error during execution. Option A is incorrect because a permissions error would result in a 4xx or 5xx StatusCode, not 200. Option B is incorrect because the function did not execute successfully—it returned an error. Option C is incorrect because a timeout would typically produce a 'null' FunctionError or a specific timeout error, not an explicit error object. Option D is correct: the function was invoked, but it returned an error.
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 was not invoked due to a permissions error.
Why it's wrong here
A permissions error, such as the invoking principal lacking `lambda:InvokeFunction` permissions, would typically result in an HTTP 403 Forbidden response from the Lambda API. In such a scenario, the `FunctionError` header would not be present in the response, as the invocation itself would be rejected by the Lambda service before the function code could even attempt execution. The exhibit's presence of `FunctionError` indicates the invocation reached the function.
- ✗
The function executed successfully but did not return any logs.
Why it's wrong here
If the Lambda function executed successfully, the `FunctionError` header would not be present in the response, as this header is specifically used to signal unhandled errors. Furthermore, successful executions typically generate logs in Amazon CloudWatch Logs, unless logging is explicitly disabled or misconfigured, which is an edge case not directly indicated by the `FunctionError` header. The presence of `FunctionError` explicitly indicates an unhandled error occurred during execution.
- ✗
The invocation timed out.
Why it's wrong here
A Lambda function timeout would result in an HTTP 200 OK status code from the Lambda service, but the `FunctionError` header would be present and typically contain a specific error type like `Task timed out after N seconds` or `TimeoutError`. The exhibit's `FunctionError` value does not indicate a timeout, but rather a generic unhandled error within the function's runtime, distinct from a service-enforced timeout.
- ✓
The function was invoked but returned an error.
Why this is correct
The presence of the `FunctionError` header in the Lambda invocation response explicitly indicates that the function code was successfully invoked by the Lambda service, but encountered an unhandled error during its execution. This error could be an exception thrown by the function code that was not caught, or a runtime error that prevented successful completion. The Lambda service captures this and signals it via the `FunctionError` header, even if the HTTP status code is 200.
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,135 original DVA-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 DVA-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 DVA-C02 exam.