Fork me on GitHub
#aws-lambda
<
2023-02-08
pesterhazy16:02:46

We're running into file size limits when loading an uberjar in Lambda. We're basically at a point where adding a new dependency puts us over the limit. According to the docs the limit is 250M but that doesn't match our uberjar size, which went from 100M to 114M. Yes it's big, but not as big as they say is allowed

pesterhazy16:02:26

Any idea on how to navigate this? It can't be that the jar is simply full right? :-)

ghadi16:02:27

lambdas support docker images with larger limits now

👍 1
pesterhazy17:02:29

I was hoping not having to make that jump but if all else fails that's definitely an option

jmglov17:02:23

Splitting the deps out into a separate layer might be an option as well.

pesterhazy17:02:08

Alas, size is total of all layers so adding layers doesn't help with the 250M limit

😭 1
ghadi18:02:01

the 250M limit is about unzipped

pesterhazy18:02:38

Yeah it's what you get when you unzip the jar

pesterhazy18:02:41

unzip -Zt uberjar.jar

pesterhazy18:02:11

Took me a long time to grok that du -sh doesn't show the right result

ghadi18:02:35

they are trying to encourage you to use container images with their asymmetrical limits

pesterhazy18:02:05

Yeah I'm letting go of my resistance to docker after 10 yrs

pesterhazy18:02:38

I thought I could wait this one out but I was wrong about that

ghadi18:02:44

i agree that docker is pointless for java