lumigo-io / lambda-log-shipper

Apache License 2.0
40 stars 5 forks source link

Function code combined with layers exceeds the maximum allowed size #8

Open WillyRL opened 3 years ago

WillyRL commented 3 years ago

Hi There,

When i try to add the layers using This AWS ARN arn:aws:lambda:ap-southeast-1:114300393969:layer:lumigo-log-shipper:3

I get this error. Function code combined with layers exceeds the maximum allowed size of 262144000 bytes. The actual size is 291495520 bytes.

how to upload it manually using zip file / s3 method?

Thank you.

saartochner-lumigo commented 3 years ago

Hi, Unfortunately, it is not possible to run an extension from an S3.

The size of this layer is indeed big, but it shouldn't occupy that much out of your memory. Is there anything else that you can filter from your deployment package (it could be other layers, unnecessary dependencies, etc)? It seems that you passed the max size only by a bit.

Which runtime do you use in your lambda? If you're using python, then another option could be to drop the runtime from the included files, which will decrease the size dramatically.