Question #1024
A developer updates an AWS Lambda function by adding several large libraries, resulting in a deployment package that exceeds the direct upload limit. The developer attempts to deploy the updated .zip file via the Lambda console but receives the following error:
An error occurred (RequestEntityTooLargeException) when calling the UpdateFunctionCode operation
Which solutions will allow the developer to deploy the updated code successfully? (Choose two.)
Upload the .zip file to Amazon S3. Use the Lambda console to update the function code by specifying the S3 bucket and object key.
Contact AWS Support to request an increase to the Lambda deployment package size limit.
Use the AWS CLI to run the update-function-code command with the --publish flag, referencing the local .zip file.
Package the Lambda function as a Docker container image, upload it to Amazon ECR, and create a new Lambda function using the container image.
Enable code signing for the Lambda function, digitally sign the .zip file, and redeploy it via the console.
Explanation
The error occurs because AWS Lambda has a direct upload limit of 50 MB for deployment packages.
- A is correct because uploading the .zip to Amazon S3 and referencing it in Lambda allows deployments up to 250 MB.
- D is correct because Lambda container images support up to 10 GB, avoiding the direct upload limit entirely.
Why others are incorrect:
- B: AWS does not allow increasing the Lambda deployment package size limit.
- C: The AWS CLI still enforces the 50 MB direct upload limit.
- E: Code signing does not address the size limitation.
Key Points: Lambda direct upload limit is 50 MB; S3 allows up to 250 MB; container images support up to 10 GB.
Answer
The correct answer is: AD