AWS Certified Developer – Associate (DVA-C02) — Question 251
A developer has created a large AWS Lambda function. Deployment of the function is failing because of an InvalidParameterValueException error. The error message indicates that the unzipped size of the function exceeds the maximum supported value.
Which actions can the developer take to resolve this error? (Choose two.)
Answer options
- A. Submit a quota increase request to AWS Support to increase the function to the required size.
- B. Use a compression algorithm that is more efficient than ZIP.
- C. Break up the function into multiple smaller functions.
- D. Zip the .zip file twice to compress the file more.
- E. Move common libraries, function dependencies, and custom runtimes into Lambda layers.
Correct answer: C, E
Explanation
The correct answers are C and E. By breaking the function into smaller functions (C), the developer can stay within the size limits imposed by AWS Lambda. Additionally, using Lambda layers (E) allows for sharing dependencies and reduces the size of the deployed function. The other options, such as increasing the quota (A) or using better compression (B and D), do not address the core issue of exceeding the maximum unzipped size limit.