Lambda layers exceed quota - how to fix?

1

When add layers (Python libraries in my case) to a Lambda Function, I receive the below error. Do any of you know how to resolve? I need the libraries within those layers' zip files. Thank you - Brendan

"Layers consume more than the available size of 262144000 bytes"

질문됨 2년 전20427회 조회
3개 답변
0

Hi Brendan,

Lambda has a 250MB Deployment package hard limit. We can see this here in our Documentation under "Deployment package (.zip file archive) size". This limit cannot be increased.

You can try to remove unneeeded packages in the Deployment package to ensure that it is within the limit. If that is not possible, the recommendation is to use Lambda with EFS as discussed here in our blog.

Please check out the whole blog but the main part that we are looking for is "Sharing large code packages with Lambda". Let us know if you may have any questions around this.

AWS
지원 엔지니어
Ryan_A
답변함 2년 전
  • Thank you, Ryan_A! I will look into this -- greatly appreciate the response. - Brendan

0

As mentioned by Lambda, total Lambda deployment size can't exceed 250MB when using the ZIP file deployment method. However, Lambda now supports also container images. Those can be up to 10GB in size. So instead of using layers, just include all the libraries in the docker image.

You can find more information about Lambda container images here.

profile pictureAWS
전문가
Uri
답변함 2년 전
  • Thank you as well, Uri! I will look into this too. I'm new to AWS, so exploring/learning the options. Thanks again - Brendan

0

You can use Docker with Lambda. It allows images up to 10GB in size. https://docs.aws.amazon.com/lambda/latest/dg/images-create.html

I've written a step-by-step guide on how to use docker with lambda - https://www.cloudtechsimplified.com/run-docker-containers-images-from-ecr-in-aws-lambda-along-with-cicd/

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠