Serverless Development in the Cloud
In recent days serverless almost mentioned in daily basis in different social media link I am following and different cloud providers are pushing and promoting to use their serverless framework to migrate some or all of your monolithic system to a more microservices approach using serverless. In this writing, I will describe the different moving pieces in the serverless.
Serverless is a way to describe the services, practices, and strategies that enable you to build more agile applications so you can innovate and respond to change faster. With serverless computing, infrastructure management tasks like capacity provisioning and patching are handled by AWS, so you can focus on only writing code that serves your customers (AWS website)
From the above AWS definition of serverless, we ll agree in serverless computing is that we don't handle the infrastructure. The cloud providers will handle that part but we pay for how much resources we are using. In my experience which I enabled some functionality to serverless architecture, I spend most of my time writing code for the lambda function to do something based on some events. These events can be triggered by the dropping of a file in S3 storage systems or SQS or SNS. All my integration works I have worked for the client follow the same pattern. But different companies use serverless in different capacity.
To give a better understanding of serverless, you will use one or more resources which shows in the blog picture above. I selected this picture because it group together the different service with their functions. In my recent integration with Twilio, I use Amazon S3 for storage, Amazon Simple Queue(SQS) for messaging, Amazon API Gateway for entry point for external service, and Lambda processing the message and the different business logic. If you really interested to the code I wrote, you can reach out and I can share the github repository.
For some one who has just started with the cloud journey, don't be scared by the different resources and service available to use the serverless framework. I always start from S3 storage. I create a bucket to store the files. Then I will create SQS and I will generate SQS message when ever I uploaded a file to S3 bucket I created. Then I will try to write a small lambda function to process the message I created. If you are using AWS cloud, the AWS website has some good resources how to navigate the different resources and systems.