Skip to content

Commit 6b2c205

Browse files
committed
modified readme
1 parent 1f063be commit 6b2c205

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This repository deploys a Node.js WebAPI and a SQL Server database on AWS. It al
2323

2424
# Workflow
2525

26-
## Overview
26+
### Overview
2727

2828
This project demonstrates a **serverless Node.js WebAPI** deployed on AWS using **Terraform**.
2929

@@ -47,15 +47,15 @@ Running `terraform apply` provisions:
4747
- updates Lambda automatically on code changes
4848

4949

50-
## API Routes
50+
### API Routes
5151

5252
| Route | Method | Description |
5353
|------------|--------|-------------|
5454
| `/` | GET | Returns a welcome message with timestamp |
5555
| `/health` | GET | Checks SQL Server connectivity and returns status |
5656

5757

58-
## Root Route `/`
58+
### Root Route `/`
5959

6060

6161
1. User requests `GET /`
@@ -68,10 +68,10 @@ Running `terraform apply` provisions:
6868
5. Lambda executes root route logic:
6969
- Generates JSON with a greeting and current timestamp.
7070
6. Lambda returns response to API Gateway.
71-
7. API Gateway sends JSON back to the client:
71+
7. API Gateway sends JSON back to the client
7272

7373

74-
## Health Route `/health`
74+
### Health Route `/health`
7575

7676

7777
1. User requests `GET /health`
@@ -83,18 +83,16 @@ Running `terraform apply` provisions:
8383
4. Lambda inspects `event.requestContext.http.path` and identifies `/health`.
8484
5. Lambda reads database environment variables:DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT, DB_SECRET_ARN
8585
6. Lambda connects to the RDS SQL Server using the credentials.
86-
7. Lambda executes a test query:
86+
7. Lambda executes a test query
8787
8. API Gateway returns the JSON response to the client.
8888

89-
## API Routes
89+
### API Routes
9090

91-
Client
92-
93-
├─ GET / ──► API Gateway ──► Lambda ──► Returns Welcome Message
94-
95-
└─ GET /health ──► API Gateway ──► Lambda ──► Connects to RDS ──► Returns DB Status
91+
GET / --> API Gateway --> Lambda --> Returns Welcome Message
92+
GET /health --> API Gateway --> Lambda --> RDS --> Returns DB Status
9693

97-
## How code changes are deployed (CI/CD workflow)
94+
95+
### How code changes are deployed (CI/CD workflow)
9896

9997
When application code is modified and pushed to GitHub, the CI/CD pipeline automatically updates the Lambda function with the latest version of the code. The process works as follows:
10098

@@ -110,7 +108,7 @@ When application code is modified and pushed to GitHub, the CI/CD pipeline autom
110108

111109
# Getting Started
112110

113-
## Prerequisites
111+
### Prerequisites
114112

115113
Before using this repository, ensure you have the following installed and configured on your machine:
116114

@@ -119,7 +117,7 @@ Before using this repository, ensure you have the following installed and config
119117
![GitHub](https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white)
120118
![AWS](https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge&logo=amazon-aws&logoColor=white)
121119

122-
## Configure AWS CLI
120+
### Configure AWS CLI
123121

124122
```bash
125123
$ aws configure
@@ -135,7 +133,7 @@ Default output format [None]:
135133
The AWS infrastructure was organised into reusable modules to build the infrastructure and this approach promotes the DRY (Don't Repeat Yourself) principle and makes your code scalable and maintainable. Terraform was used to provision the infrastructure, with the state backend securely hosted on AWS S3, enabling reliable tracking.
136134

137135

138-
## Terraform directory
136+
### Terraform directory
139137

140138
```text
141139

0 commit comments

Comments
 (0)