Image of AWS Lambda in plain english

ADVERTISEMENT

Table of Contents

Introduction

What is Lambda? It is a Cloud service offered by AWS to host your application(s). You upload an application and it gets automatically deployed to a URL endpoint.

AWS Lambda Example

Let's take, for example, you have an application that receives a JPG image file and converts it to a PNG file. That's all it does. You can upload your application to AWS Lambda and it deploys your application to a URL endpoint, ie. www.mysite.com/jpgtopng. So, when someone clicks on that web address they can start using your application. You don't have to worry about how to load balance or configure hardware infrastructure - AWS takes care of all of it.

Let's take it a step further - say, for example, you want to expose some collected data in JSON on an endpoint. Your next application does three things:

  • Collects the data from somewhere
  • Makes it JSON
  • Puts the JSON in the index.html

Zip up your application, upload it to AWS and access the new endpoint. It might be called www.mysite.com/collectdata. Every time someone hits that endpoint, the application will collect a new version of the data, make it JSON, and then will put it in the HTML.

Breaking your system down into smaller applications is helpful when thinking about using AWS Lambda.

Lambda has Autoscaling, so the infrastructure scales up or down depending on the amount of traffic that the application attracts. If an application has low traffic, then this saves costs in purchasing unnecessary network infrastructure. This can increase the performance of your web app..

Conclusion

In this article, we described AWS Lambda and provided an example illustrating how it works.

Final Notes