Courseiva
Question 1,239 of 724
DeploymenteasyMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is deploying a new version of a Lambda function using the AWS CLI. Which command should the developer use to update the function code?

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

aws lambda update-function-code

The `update-function-code` command updates the code of a Lambda function. Option B (`update-function-configuration`) updates configuration settings only, not the code. Option C (`invoke`) is for invoking the function, and option D (`create-function`) is for creating a new function, not updating an existing one.

Answer analysis

Option-by-option breakdown

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

  • aws lambda update-function-code

    Why this is correct

    aws lambda update-function-code is the correct command because it uploads a new deployment package (ZIP file or container image) to the Lambda service, replacing the code currently associated with the function. This command updates the function's code while preserving its configuration, and it operates on the $LATEST version unless you specify a different qualifying qualifier, making it the proper way to deploy a new code version.

  • aws lambda update-function-configuration

    Why it's wrong here

    aws lambda update-function-configuration is incorrect because it modifies the function's runtime, memory limit, timeout, environment variables, VPC settings, and IAM role, but it does not alter the code logic itself. Updating the configuration alone leaves the current code in place, so it cannot introduce a new version of the application logic.

  • aws lambda invoke

    Why it's wrong here

    aws lambda invoke is incorrect because it only synchronously or asynchronously executes the currently deployed Lambda function and returns the invocation response, execution status, and logs. It performs no write operations on the function's code or configuration, so it cannot update any aspect of the function, let alone deploy a new version.

  • aws lambda create-function

    Why it's wrong here

    aws lambda create-function is incorrect because this command provisions an entirely new Lambda function resource, including its unique function name, execution role, and handler. Running it against an existing function name will fail or require deleting the current function first, so it cannot be used to deploy a new version of an already deployed function.

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 creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.