Courseiva

DVA-C02 Development with AWS Services Practice Question

Network Topology
$ aws lambda invokefunction-name my-functionpayload '{"key1":"value1"}' output.txtRefer to the exhibit."StatusCode": 200,"ExecutedVersion": "$LATEST","FunctionError": ""

Refer to the exhibit. A developer runs the AWS CLI command to invoke a Lambda function. The output shows StatusCode 200 and no FunctionError. However, the application that depends on this function's output is not working correctly. What should the developer check next?

⚠ Common exam trap

A common mix-up: candidates assume a 200 status code guarantees correct application behavior, but Lambda's success response only indicates the function ran to completion, not that its business logic or output is correct for the caller.

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

✓

Check the Lambda function's CloudWatch Logs for any errors or unexpected output.

A StatusCode 200 with no FunctionError indicates the Lambda function executed and completed without a runtime or invocation error. However, the application may still fail if the function returns incorrect data or has logical errors. Checking CloudWatch Logs is the standard next step to inspect the actual execution logs, print statements, or handled logic errors that would reveal why the output is incorrect.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Check the Lambda function's CloudWatch Logs for any errors or unexpected output.

    Why this is correct

    If the Lambda function executed successfully (no FunctionError), but the result is not as expected, the primary place to investigate the function's internal logic and output is CloudWatch Logs. The function's console.log (or equivalent in other runtimes) statements, along with any unhandled exceptions or specific return values, are all captured here, providing crucial insights into its runtime behavior and what it actually returned.

  • ✗

    Check the IAM role attached to the Lambda function for insufficient permissions.

    Why it's wrong here

    Insufficient IAM permissions for the Lambda function's execution role would typically manifest as an AccessDeniedException or similar error within the function's CloudWatch Logs, often leading to a FunctionError status. If the function executed successfully without a FunctionError, it implies that the necessary permissions for its own execution and any AWS service calls it attempted were likely present.

  • ✗

    Check the payload format against the function's expected input.

    Why it's wrong here

    Although an incorrect payload format could certainly lead to unexpected behavior, if the Lambda function executed successfully without a FunctionError, it means the runtime successfully invoked the handler. Any issues with parsing or processing the event payload within the function's code would typically result in an error logged to CloudWatch, or the function would return an unexpected output based on its internal logic, rather than preventing the function from running at all.

  • ✗

    Check the Lambda function's memory and timeout configuration.

    Why it's wrong here

    Issues related to the Lambda function's memory allocation or timeout configuration would typically cause the function to terminate prematurely with a FunctionError or Task timed out message, respectively. Since the question implies the function executed successfully, these configuration parameters are unlikely to be the root cause of an unexpected output rather than a complete failure.

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