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?
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.
I think the question should have been more specific about the size of the code. The solution D is always correct. The solutiuon B is correct if the uncompressed size is less than 512MB. In the question was not specified the size of the code. In my experience is rarely to have a micoreservice code size more 12MB.
If the dependency file is too large for a Lambda layer (i.e., greater than 250 MB when compressed), store the file in an Amazon S3 bucket.
In your Lambda function code, you can download the dependency file from S3 at runtime using the AWS SDK. This would ensure that the function has access to the file without exceeding Lambda's storage limits.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
tullio85
3 months, 2 weeks agopreachr
6 months, 2 weeks agopreachr
6 months, 2 weeks agoYUICH
6 months, 2 weeks ago