How to deploy AWS Lambda with large dependencies?
A developer needs to deploy the code for a new application on an AWS Lambda function. The application needs a dependency file that is 500 MB to run the business logic. Which solution will meet these requirements?
Community Votes
60% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests your understanding of AWS Lambda deployment package size limits versus container image limits, with the common trap being assuming that storing a .zip file in S3 bypasses the 250 MB unzipped size restriction.
For AWS Lambda functions requiring dependencies exceeding the standard 250 MB unzipped limit, container images are the necessary deployment method. The community consensus confirms that packaging code and large dependencies into a container image stored in Amazon ECR is the only viable solution for a 500 MB dependency.
Many candidates incorrectly choose Option B, believing that uploading a .zip file to Amazon S3 bypasses Lambda's storage limits; however, Lambda functions cannot use deployment packages (zipped or unzipped) that exceed the 250 MB limit.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option D is correct because AWS Lambda supports container images up to 10 GB, which easily accommodates the 500 MB dependency. Unlike .zip deployment packages, container images allow for much larger dependencies and libraries. The workflow involves building the image, pushing it to Amazon ECR, and then deploying the Lambda function from that repository.Why the Other Options Are Wrong
Options A and B are incorrect because Lambda deployment packages (.zip files) have a hard limit of 250 MB for the unzipped size (and 50 MB for the zipped size). A 500 MB dependency violates these limits regardless of whether it is uploaded directly or via S3. Option C is incorrect because Lambda functions cannot be configured to run container images directly from an Amazon S3 bucket; they must pull images from Amazon Elastic Container Registry (ECR).Community Comment Notes
Comment [1] highlights confusion regarding code size versus dependency size but correctly identifies D as the universally correct answer. Comment [2] suggests a runtime download strategy, which is a valid workaround for static assets but is not a deployment option listed in the question choices. Comment [3] reaffirms that D is the definitive answer.Official Reference
Exam Strategy
Always memorize the critical Lambda size limits: 250 MB for unzipped .zip deployment packages and 10 GB for container images. If a question mentions dependencies or assets larger than 250 MB, immediately eliminate any .zip-based options.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →