The first time I heard about AWS lambda it make me doubt my career.

AWS Lambda Tutorial

submited by
Style Pass
2022-01-12 20:00:14

The first time I heard about AWS lambda it make me doubt my career. "Less" is an adjective suffix meaning “without” so I thought serverless is a way of getting rid of the servers. I'm a backend developer so I imagine this is a way of generating backend code. In reality serverless is just a way of making your backend easier to scale. Actually, you don't have to worry about how to scale it.

A few weeks ago I read again about it, it was something about how to build a SaaS with 0$, and lambda was mentioned because you get 1 000 000 free calls. I liked the idea, seeing some benefits in it and I thought it would be useful to try all sorts of things, so I will need an easy deployment process that I could use to quickly run side projects. In order to follow this, you will need an AWS account and aws cli working. I will be using java but it should be easy to adapt to any other language because I will deploy it using Docker container. I did this using the command line because it is easier to replicate.

In theory, things are simple. You write a function that is ran based on some event. In this tutorial, the event is a REST call. Each such function will be executed in a container. This means lambda has its own isolated execution environment. The container is created when the function is executed for the first time. After some time the container is destroyed. Because of this, you might get into cold start issues. This happens because your container may take some time to start. Sometimes AWS will reuse your container so you won't notice it but if your function is rarely called you might see it takes a lot of time to execute.

Leave a Comment