Self Healing EC2
Overview
This project provisions an EC2 instance using Terraform, installs NGINX and monitoring scripts via cloud-init, and includes a Bash-based self-healing system. It monitors service health and disk usage, restarts services when they fail, and sends alerts via Slack. Logs and uptime data are pushed to an S3 bucket.
Technologies Used
- Terraform (AWS provider, cloud-init injection)
- Bash (health checks, logging, Slack alerts)
- AWS EC2 (infrastructure layer)
- S3 (log storage)
- Slack Webhook (alerting)
- systemd (timers for health checks)
Features
- ๐ก Auto-heals failing services
- ๐ฆ Slack alert integration
- ๐ชต S3 log backups
- ๐ Cloud-init automation
- ๐งช Tested and validated with real AWS instances
Repo
๐ View on GitHub
If you’re interested in building something similar, check the NOTES.md files in the repo for lessons learned and architecture breakdowns.