Serverless computing is one of the most innovative and modern ways of building applications. It offers a way to run applications without the need to manage servers or infrastructure. In this blog post, we will explore how to build a serverless Bookshelf application on Amazon Web Services (AWS) using a set of powerful and flexible tools and services.
The Bookshelf application used in the demonstration is a simple application that allows authenticated users to view a list of books. We will use several AWS services to build the application, including Amazon S3, Amazon DynamoDB, AWS Lambda, Amazon API Gateway, and Amazon Cognito.
To go through the process of building the serverless application, I have created a step-by-step guide in the form of a README file available on my GitHub repository. The repository also includes all the code and configurations required to build the application. You can find the repository here: https://github.com/sazecis/aws-dev-examples.
Architecture Diagram:
The following diagram illustrates the architecture of the Bookshelf application:
As you can see in the diagram, the Bookshelf application uses several AWS services, including Amazon S3, Amazon DynamoDB, AWS Lambda, Amazon API Gateway, and Amazon Cognito. The application's static content is hosted on Amazon S3, and the Bookshelf data is stored in Amazon DynamoDB. AWS Lambda is used to read the Bookshelf data from DynamoDB, and Amazon API Gateway is used to expose the Bookshelf data to the internet. Amazon Cognito is used to authenticate and authorize users accessing the Bookshelf data.
Building the Application:
To build the Bookshelf application, we will use the AWS SDKs and Command Line Interface (CLI) tools. We will start by creating an Amazon S3 bucket and hosting the static content of the application on it. Next, we will create an Amazon DynamoDB table to store the Bookshelf data. We will then create an AWS Lambda function that reads the Bookshelf data from DynamoDB and exposes it through an Amazon API Gateway REST API. Finally, we will secure the Bookshelf API using Amazon Cognito as an authorizer.
The whole application deployment is willingly not done with full automation. Manual steps are part of the demo. The manual steps are described in the README and are dependent on each other.
Have fun and please leave your comment either here or directly at my repository.
Top comments (0)