Replies: 2 comments 3 replies
-
No, we are quite far from hitting this limit. But we're paying extra attention for our As for now layer with runtime dependencies weights about 70 MiB unarchived. And we have quite a lot of packages there: graphql client, http client, openapi validator, html parser, multipart request parser, … Every function itself weights just about dozens or hundreds of kilobytes because it contains only handler for this function and files that this particular handler uses. See Bonus: Put only relevant code into your Lambdas functions part of our blog post. You can check your layer and function weights with command like this: sam build
du -h -d 1 .aws-sam/build/ | sort -h -r Also note that these numbers doesn't just sum up as deployment package for every lambda consists from only this Lambda folder and layers that it uses. So yes, you can keep all your handlers in one repo. |
Beta Was this translation helpful? Give feedback.
-
However, if your dependencies (or whatever) is really huge, you can switch to Lambda Container Images. Size limit for those is 10 GB. AWS SAM CLI supports them starting from version 1.13.1). And here is the manual: Using container image support for AWS Lambda with AWS SAM But we don't have experience with Lambda container images yet. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your PoC, guys. Though your article has minor differences from the git repo, I managed to run it.
Did you hit the problem with the total size of a lambda 250Mb including all layers? If we build all handlers in one repo this might become a problem very quickly with modules size.
Beta Was this translation helpful? Give feedback.
All reactions