A developer packaged a Lambda function as a .zip file and tried to upload it from the Lambda console Functions page, but the console returned an error indicating the package could not be uploaded. Which of the following methods can be used to publish the code? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Upload the package to Amazon S3, then use the Lambda console Functions page to provide the S3 location and upload the package from there., Repackage the function as a Docker container image, push the image to Amazon Elastic Container Registry (Amazon ECR), and create a new Lambda function that references the ECR image..
Why this is the answer
The console has a size limit for direct .zip file uploads. If the package exceeds this limit, uploading to S3 first and then referencing the S3 object in the Lambda console bypasses this restriction, as S3 supports much larger file sizes. Alternatively, Lambda supports deploying functions as container images. Repackaging the function as a Docker image and pushing it to ECR allows for larger deployment packages than the .zip file limits, as the container image size limits are significantly higher. Creating an AWS Support case is not a direct solution for publishing code and package size limits are typically fixed. The update-function-code command with --publish is for updating existing functions and publishing new versions, but it doesn't bypass the underlying size limits for the initial upload if the package is too large. Digitally signing the .zip file is for code integrity and trust, not for addressing package size limitations.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed