A fully automated, serverless platform on AWS that deploys containerized web applications from a simple git push. Built with cost-efficiency and minimal operational overhead in mind.
This project implements a GitOps workflow where:
- Developers push code to the main branch
- GitHub Actions automatically builds and scans Docker images
- Images are pushed to AWS ECR
- ECS Fargate services are automatically updated with new deployments
- Serverless: Uses AWS Fargate for compute (no EC2 management)
- Cost-Effective: Leverages free-tier eligible services
- Automated: Full CI/CD pipeline with GitHub Actions
- Secure: Container vulnerability scanning with Trivy
- Infrastructure as Code: Complete Terraform implementation
- Cloud Provider: AWS
- Container Orchestration: AWS ECS on Fargate
- Container Registry: AWS ECR
- CI/CD: GitHub Actions
- Infrastructure as Code: Terraform
- Containerization: Docker
- Sample Application: Python Flask API
├── .github/
│ └── workflows/
│ └── deploy.yml
├── infrastructure/
│ ├── main.tf
│ ├── ecs_service.tf
│ ├── variables.tf
│ └── outputs.tf
├── sample-app/
│ ├── app.py
│ ├── requirements.txt
│ └── Dockerfile
├── docs/
│ └── architecture.md
└── README.md
-
Clone and Setup:
git clone <repository-url> cd ServerlessGitOpsPaaS
-
Configure AWS Credentials:
aws configure
-
Deploy Infrastructure:
cd infrastructure terraform init terraform plan terraform apply -
Configure GitHub Secrets:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONECR_REPOSITORY_URIECS_CLUSTER_NAMEECS_SERVICE_NAME
-
Push to Main Branch:
git push origin main
- Uses AWS Fargate (pay-per-use, no idle costs)
- Leverages AWS free tier where possible
- Minimal resource allocation for development
- Auto-scaling based on demand
- Container vulnerability scanning with Trivy
- IAM roles with least privilege access
- VPC isolation with private subnets
- HTTPS-only communication
- CloudWatch logs for application monitoring
- ECS service metrics
- GitHub Actions workflow status tracking
- Fork the repository
- Create a feature branch
- Make your changes
- Push to trigger the deployment pipeline
- Submit a pull request
MIT License - see LICENSE file for details