3 ms·
AWS Lambda is a very small interface. I'm only getting started, but I'm planning to keep all my application code in a separate project with no Lambda dependenci
by mseebach 9y ago
AWS Lambda is a very small interface. I'm only getting started, but I'm planning to keep all my application code in a separate project with no Lambda dependencies, test that as I would any application, and then have a thin wrapper that just wraps each endpoint in the Lambda interface.
This would also maintain as loose as possible coupling to the Lambda ecosystem, making porting easy -- I'm in Java-land, so that probably means Dropwizard. I'm not there yet, but I'm planning to maintain a parallel Dropwizard wrapper, to make local dev easy.
- parzivalm 9y agoHave you thought about the added execution time from JVM startup? A project I had dropped in my lap awhile ago was figuring out a way to speed up a java lambda function. Basically we decided the only way was to try and make the lambda container always hot. A cloudwatch event would trigger the lambda function every 5 minutes to make sure it was always hot.
- mseebach 9y agoFor now, my project isn't very sensitive to taking a couple-of-seconds warm-up hit. But I'm aware of the issue, and it seems that keeping your classpath lean works wonders. I'll be investigating further, but my tentative plan is to section the endpoints by their dependency-size. The majority of the enduser-latency-sensitive endpoints will need little more than a JDBC connector.