Courseiva
Deployment →easyMultiple Choice

DVA-C02 Deployment Practice Question

A developer is deploying a new version of a Lambda function using an AWS CodePipeline pipeline. The deployment fails during the 'Deploy' stage with an error indicating that the function's code is too large. What should the developer do to resolve this issue?

⚠ Common exam trap

Watch out — candidates often confuse Lambda's execution timeout or memory limits with the deployment package size limit, or incorrectly assume that CloudFront can serve as a storage backend for Lambda 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

✓

Upload the Lambda deployment package to Amazon S3 and reference it from the function

AWS Lambda has a hard limit of 50 MB for direct uploads via the console or API. When a deployment package exceeds this limit, the correct approach is to upload the package to Amazon S3 and configure the Lambda function to reference the S3 object. CodePipeline can then use the S3 location to deploy the function, bypassing the direct upload size restriction.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Upload the Lambda deployment package to Amazon S3 and reference it from the function

    Why this is correct

    The AWS Lambda service imposes a direct upload limit of 50 MB for deployment packages. For larger codebases or dependencies, developers must upload the deployment package, which can be up to 250 MB unzipped, to an Amazon S3 bucket. Referencing the S3 object's key and version from the Lambda function configuration allows the service to retrieve the code, circumventing the direct upload size constraint and enabling successful deployment of substantial applications.

  • ✗

    Increase the Lambda function's timeout setting

    Why it's wrong here

    Increasing a Lambda function's timeout setting only affects the maximum duration for which the function is allowed to execute before being terminated. This configuration parameter is entirely unrelated to the size of the deployment package containing the function's code and dependencies. Adjusting the timeout will not resolve any issues related to exceeding the deployment package size limits during the deployment process.

  • ✗

    Use Amazon CloudFront to distribute the Lambda code

    Why it's wrong here

    Amazon CloudFront is a content delivery network (CDN) primarily designed for securely delivering data, videos, applications, and APIs globally with low latency. While CloudFront can integrate with Lambda@Edge functions to customize content at the edge, it is not a service for distributing or deploying the core Lambda function code itself to the Lambda service. Its purpose is content caching and distribution, not code storage for Lambda deployments.

  • ✗

    Enable AWS X-Ray tracing on the Lambda function

    Why it's wrong here

    Enabling AWS X-Ray tracing on a Lambda function is a monitoring and debugging feature that helps developers analyze and debug serverless applications. X-Ray provides detailed insights into function invocations, performance bottlenecks, and service interactions by generating a trace map. This capability is completely independent of the Lambda deployment process and has no impact on the size of the deployment package or the ability to upload it.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

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.