AWS Certified Developer – Associate (DVA-C02) — Question 414
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?
Answer options
- A. Compress the application code and dependencies into a .zip file. Directly upload the .zip file as a deployment package for the Lambda function instead of copying the code.
- B. Compress the application code and dependencies into a .zip file. Upload the .zip file to an Amazon S3 bucket. Configure the Lambda function to run the code from the .zip file in the S3 bucket.
- C. Package the application code and dependencies into a container image. Upload the image to an Amazon S3 bucket. Configure the Lambda function to run the code in the image.
- D. Package the application code and dependencies into a container image. Push the image to an Amazon Elastic Container Registry (Amazon ECR) repository. Deploy the image to the Lambda function.
Correct answer: D
Explanation
AWS Lambda limits the size of unzipped .zip deployment packages to 250 MB, making both options A and B unviable for a 500 MB dependency. To support larger deployment packages, Lambda allows container images up to 10 GB in size, which must be stored in Amazon Elastic Container Registry (Amazon ECR). Storing container images directly in Amazon S3 for Lambda deployment is not supported, making option D the only correct solution.