Software Development Engineer

Blog PostsResume

Developing and Deploying a Serverless Blog using AWS Lambda and API Gateway

Building a serverless application allows you to focus on your application code instead of managing and operating infrastructure. You do not have to think about provisioning or configuring servers since the cloud providers handles all of this for you. This reduces your infrastructure management burden and helps you get faster time-to-market.

In this blog post, I describe the way I developed and deployed a Serverless Blog using the following technologies

  1. AWS Lambda (NodeJS 6.10)
  2. Amazon API Gateway
  3. Amazon S3
  4. Contentful API

Application Architecture

Architecture

I have been a fan of Contentful since I first developed this blog back in 2016. Its API first approach has allowed me to update the design and deploy the blog on various platforms without worrying about the storage of its content. Thus, there was no question vis a vis the use of Contentful in this serverless revamp. The use of AWS services was a no-brainer due to the ease of their use and a very heuristic approach in development through these services.

Amongst the AWS Services, Amazon S3 hosts static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user's browser. JavaScript executed in the browser sends and receives data from a public backend API built using AWS Lambda and Amazon API Gateway. Contentful provides a persistence layer from where the data is retrieved by the API's Lambda function.

You may find the Source Code here: https://github.com/imujjwal96/serverless-blog


© 2024 Ujjwal Bhardwaj. All Rights Reserved.