DVA-C02 · Question #481
A developer compiles an AWS Lambda function and packages the result as a .zip file. The developer uses the Functions page on the Lambda console to attempt to upload the local packaged .zip file. When
The correct answer is A. Upload the package to Amazon 3. Use the Functions page on the Lambda console to upload the D. Repackage the Lambda function as a Docker container image. Upload the image to Amazon. When a Lambda deployment package exceeds the 50 MB direct-upload limit, the developer must either upload the zip to S3 and reference it, or repackage the function as a container image (up to 10 GB).
Question
A developer compiles an AWS Lambda function and packages the result as a .zip file. The developer uses the Functions page on the Lambda console to attempt to upload the local packaged .zip file. When pushing the package to Lambda, the console returns the following error:
Which solutions can the developer use to publish the code? (Choose two.)
Options
- AUpload the package to Amazon 3. Use the Functions page on the Lambda console to upload the
- BCreate an AWS Support ticket to increase the maximum package size.
- CUse the update-function-code AWS CLI command. Pass the --publish parameter.
- DRepackage the Lambda function as a Docker container image. Upload the image to Amazon
- ESign the .zip file digitally. Create a new Lambda function by using the Lambda console. Update
How the community answered
(40 responses)- A85% (34)
- B3% (1)
- C8% (3)
- E5% (2)
Why each option
When a Lambda deployment package exceeds the 50 MB direct-upload limit, the developer must either upload the zip to S3 and reference it, or repackage the function as a container image (up to 10 GB).
Uploading the zip to Amazon S3 and then pointing the Lambda console or CLI to the S3 object bypasses the 50 MB direct-upload limit, allowing packages up to 250 MB (unzipped).
The 50 MB direct-upload and 250 MB unzipped limits are service quotas that cannot be increased through an AWS Support ticket.
The update-function-code CLI command with --publish still enforces the same package size limits as the console; it does not bypass the size restriction.
Repackaging as a Docker container image and pushing it to Amazon ECR allows Lambda to use images up to 10 GB, completely eliminating the zip size constraint.
Digitally signing the zip file does not change its size or circumvent the upload size limit in any way.
Concept tested: Lambda deployment package size limits and alternatives
Source: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
Community Discussion
No community discussion yet for this question.