Super-powered AWS Lambdas

elbuo
2 min readFeb 24, 2015

tl;dr: Go checkout LambdaRuntime.

On my first week at RebelMail I noticed how tight the system was with AWS Lambdas. This got me very excited given that Lambdas are a brand new toy which in my opinion is pretty damn awesome. At the same time, I also got the chills given that its still in Beta and many things are yet to be defined.

“It completely threw me off since you might override your Lambda if it has the same name and cause a complete chaos.”

First thing I noticed was the lack of tagging or versioning. It completely threw me off since you might override your Lambda if it has the same name and cause a complete chaos. Since there is no versioning, the user must figure out a logic on how to upgrade their Lambdas as well as supporting the old ones if necessary.

Having multiple AZs is the preferred practice for AWS (or any cloud infrastructure setup). Lambdas shouldn’t be an exception. Currently, there are 3 regions that support Lambdas. When attempting to execute Lambdas, one should take into consideration downtimes etc and make full use of the multi regions that AWS offers.

For this and some other reasons I took some time to build LambdaRuntime. It enforces conventions on how you name your Lambdas in exchange for a few benefits.

The convention is the following:

name-of-the-package-ENVIRONMENT-MAJOR-MINOR-PATCH

*AWS only allows — as a delimiter in Lambda names*

Benefits include:

  • Having semantic versioning
  • Multi-AZ Fallback
  • Multi-ENV

Be sure to check it out if you are using AWS Lambdas. I will keep posting tidbits like how we included Lambdas in our CI as well as other practices we have come up with.

If you have any feedback or suggestions feel free to shoot me a tweet.

--

--