Cannot run my lambda due to the hard coded memory limit.

0

I am using a lambda function which I recently extended in functionality. Therefore I needed to add another layer (scipy) in order to run the python code. But when I try to add the scipy layer, the lambda is telling me, that my limit of 262MB is exceeded. My lambda is pollin a API and deriving the received data (spectral data). What would be your suggestions to make the function running?

Thanks and BR Tobias

Tobi
질문됨 3달 전112회 조회
3개 답변
1

Hello.

I have never used "scipy", but what size will it be when layered?
Lambda layers have a limit of 250MB, so if they are larger than this, they cannot be used.
https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html

I think one of the workarounds for layer size is to use a container image as the runtime.
I think you can use this with somewhat larger layers.
https://docs.aws.amazon.com/lambda/latest/dg/images-create.html#images-types

Also, if there is a memory limit during execution, I think there will be no problem if you increase it from the Lambda settings.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console

profile picture
전문가
답변함 3달 전
profile pictureAWS
전문가
Uri
검토됨 3달 전
1

As per documention, deployment package limit is 250 MB which is about 262,144,000 bytes . This quota applies to all the files you upload, including layers and custom runtimes. Try removing unnecessary packages,

If you are unable to reduce package size, you can perhaps explore changing from Lambda Python runtime to Lambda container image instead. The code package size limit is 10 GB (maximum uncompressed image size, including all layers)

AWS
전문가
Mike_L
답변함 3달 전
0

If need to process large files or load many large dependencies in AWS Lambda, you can do it by putting them on EFS volume which can be mounted to Lambda.

답변함 3달 전

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

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

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

관련 콘텐츠