Skip to content

A repos to explain the microservice deployment (Private repos)

Notifications You must be signed in to change notification settings

mohammedkausar/GatewayStack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

AWS Microservices(Modular) Deployment

Summary

Production-style deployment of backend microservices on AWS with automated CI/CD.

Architecture

  • CloudFront (/ → S3, /api/* → ALB)
  • VPC with public and private subnets
  • ALB in public subnets (multi-AZ)
  • EC2 in private subnet
  • NAT for outbound access only

Architechture image.

Services

  • Order Service (FastAPI)
  • Payment Service (FastAPI)
  • systemd-managed processes

CI/CD

  • GitHub Actions
  • OIDC-based authentication
  • Deployment via AWS SSM
CI/CD Flow
──────────────────
Developer
   ↓
GitHub (Private)
   ↓
GitHub Actions (OIDC)
   ↓
AWS Account
 ├─ EC2 (backend deploy)
 └─ S3 (frontend deploy)

Frontend:
---------

    - Code is pushed to release branch
    - Workflow builds the dist folder
    - Files in dist folder pushed to S3

Backend - Microservices
-----------------------
    - GitHub Actions triggers deployment via AWS SSM
    - Code is fetched on the instance during deployment
    - Services restarted using systemd
    - Services run as systemd-managed units

Networking

  • Single VPC spanning multiple Availability Zones
  • Application Load Balancer deployed in public subnets (ap-south-1b, ap-south-1c)
  • Backend EC2 instances run in a private subnet (ap-south-1a)
  • ALB is the only ingress point for API traffic
  • EC2 instances have no direct internet access
  • Outbound traffic from EC2 is routed through a NAT Gateway
  • Internet Gateway attached to the VPC for public subnet access

Logging

  • CloudWatch Agent
  • systemd / journalctl logs
  • Structured JSON format
  • Request ID tracking

Repositories

(Source code is private)

  • order-microservice
  • payment-service
  • gateway-infra
  • gateway-fe

Future Enhancements

  • Docker-based deployment - In progress
  • Terraform for infrastructure provisioning

About

A repos to explain the microservice deployment (Private repos)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors