The serverless approach to building applications is getting more and more popular. It might be appealing to write and deploy code without worrying about the infrastructure underneath.
Serverless computing still involves servers. The provider takes care of their maintenance entirely, though. We write event-driven functions that contain business logic. The provider charges us solely based on the compute time instead of a monthly fee.
The most mature Function as a service (FaaS) platform seems to be AWS Lambda. In this article, we explore its basics and some of the uses cases.
To create our first function, let’s go to the AWS Lambda dashboard and click on “Create function”. Let’s keep it simple for now.
The first thing that we notice after creating our first function is the code editor.
We end up with a fundamental “Hello world” code. Let’s modify it a little bit:
Above, you can see that we use the event . name property. This is thanks to the fact that we can send JSON data along with our events.
Let’s create a test event and try out our function.
#aws #javascript #python