Skip to content

A serverless blogging platform built with React.js (frontend), AWS API Gateway (middleware), AWS Lambda (backend), and DynamoDB (database). It enables users to create, update, delete, and view blog posts seamlessly while ensuring high scalability, cost-efficiency, and real-time performance with AWS cloud services.

Notifications You must be signed in to change notification settings

anjalichennupati/Serverless_Blogging_Platform_using_AWS_Services

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Blogging Platform

Overview

Overview

This project is a serverless blogging platform designed for scalability, cost efficiency, and ease of management using Amazon Web Services (AWS). Traditional blogging platforms often struggle with infrastructure overhead and scaling issues. By leveraging AWS Lambda, Amazon API Gateway, and Amazon DynamoDB, this project ensures automatic scaling, high availability, and minimal operational maintenance. The platform dynamically adjusts to traffic demands, providing a seamless user experience while optimizing costs. Below is an overview of the analysis, along with sample outputs and results. This project was done in Dec' 2024.

Block Diagram

  • The below block diagram gives an overview of the overall funtionality of the implemented project

App Screenshot

Features

  • Serverless Architecture: Built entirely using AWS Lambda, API Gateway, and DynamoDB, the platform eliminates the need for server management while ensuring high availability, scalability, and cost efficiency.

  • CRUD Operations with API Gateway & Lambda: Users can create, read, update, and delete (CRUD) blog posts through a React.js front end, which interacts with AWS Lambda functions via API Gateway endpoints for seamless backend processing.

App Screenshot App Screenshot

  • DynamoDB Storage for Scalable Data Management: The platform leverages Amazon DynamoDB for efficient key-value storage, ensuring fast data retrieval, auto-scaling capabilities, and a schema-less structure to accommodate dynamic content changes.

App Screenshot

  • Secure and Reliable Access Management: IAM roles, API Gateway security, and CORS integration protect the platform, enabling secure authentication, controlled access, and smooth cross-origin communication between the front end and backend services.

App Screenshot App Screenshot

Tech Stack Used in the Serverless Blogging Platform

  1. Frontend:
  • React.js – For building an interactive and responsive UI.
  1. Backend & Middleware:
  • AWS Lambda – For executing serverless functions handling business logic.
  • AWS API Gateway – For managing HTTP requests and routing them to Lambda functions.
  1. Database:
  • Amazon DynamoDB – NoSQL database for storing blog posts efficiently.
  1. Security & Access Management:
  • AWS IAM (Identity and Access Management) – For secure authentication and access control.
  • CORS (Cross-Origin Resource Sharing) – To allow secure cross-origin requests.
  1. Monitoring & Logging:
  • AWS CloudWatch – For real-time monitoring, logging, and debugging.

Installation

Prerequisites
Ensure you have the following installed/configured before proceeding:

  • Note that this project was implemented under AWS Free Tier and make sure to keep a track of the number of instances you are launching to not exceed the Free Tier limit
  • Node.js & npm (for frontend setup)
  • AWS Lambda, IAM, API Gateway, and DynamoDB setup

Frontend Setup (React.js)

  1. Install dependencies:
    npm install
  2. Configure API Gateway URL:
  • Replace the proxy in package.json with your AWS account link
  • Replace the API paths with your AWS API Gateway endpoint in files (from /src directory) BlogDetails.js, BlogList.js, Home.js, create.js, useBlogs.js and useFetch.js.
  1. Start the development server:
    npm start

Backend Setup (AWS Lambda + API Gateway + DynamoDB)

  1. Set Up AWS DynamoDB
  • Open the AWS Console → Navigate to DynamoDB.
  • Create a new table:
    • Table Name: blog-database
    • Primary Key: blogId (String)
  1. Deploy AWS Lambda Functions

  2. Navigate to AWS Lambda** in the AWS Console.

  3. Create a new function:

    • Runtime: Node.js
    • Execution Role: Create a new IAM role with access to DynamoDB.
  4. Upload or Write the Lambda Function Code:

    • Use the AWS Console editor or deploy using the AWS CLI:
      aws lambda create-function --function-name blogLambda \
        --runtime nodejs18.x --role arn:aws:iam::<your-account-id>:role/<your-lambda-role> \
        --handler index.handler --zip-file fileb://lambda.zip
    • Ensure the function correctly handles GET, POST, PATCH, DELETE requests.

Configure API Gateway

  1. Open Amazon API Gateway → Create a new REST API.
  2. Create Resources & Methods:
    • /blog → Methods: GET, POST
    • /blog/{id} → Methods: GET, PATCH, DELETE
  3. Integrate with AWS Lambda:
    • Select "Lambda Function" as the integration type.
    • Link it to the respective Lambda function.
  4. Enable CORS for API Gateway to allow frontend requests.
  5. Deploy the API and note the Invoke URL.

Final Steps

  • Run the frontend and test CRUD operations via the UI.
  • Monitor logs via AWS CloudWatch.

Running Tests

The project can be implemented and tested to verify funtionality

About

A serverless blogging platform built with React.js (frontend), AWS API Gateway (middleware), AWS Lambda (backend), and DynamoDB (database). It enables users to create, update, delete, and view blog posts seamlessly while ensuring high scalability, cost-efficiency, and real-time performance with AWS cloud services.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published