The Twelve Days of AWS: Lambda

12 Days of AWS Day 2 written around snowflakes with a penguin wearing earmuffs dancing

When I needed to perform small operations on files stored in S3, I turned to this next tool in the AWS arsenal, Lambda. Lambda is effectively a ‘serverless’ script running platform, whereas of the time of writing, code in Node.js, Python, Java, Ruby, Go, C# or PowerShell will be run whenever triggered by specific events. A few examples of these events are: S3 Object uploaded, Amazon Alexa, and Manual trigger via the Lambda UI.

The idea with Lambdas is that they are relatively simple, short-lived, on-demand scripts. When they are not being run they are not using server time, and hence resources. You only pay for what you use, so they are great for operations that only happen every now and then or small jobs that don’t take much time to perform.

One of the things I find incredibly useful about Lambdas is that since they are tightly integrated into the AWS infrastructure, getting event-driven actions is a breeze, and you can effectively ‘hook’ onto all sorts of other tools.

What is possibly the more complicated part is configuring all of the Lambda specific stuff around the code to make things work. For that, I use a tool that makes a lot of that happen automatically, and which I will be talking about tomorrow, and that tool is a framework called Serverless.