GitHub Actions ECS Deployment Pipeline
Build, push to ECR, deploy to ECS Fargate with rolling update, auto-rollback on health check failure, and Slack notification.
Production-Ready ECS Fargate Deployment Pipeline
A complete GitHub Actions workflow that handles every step of deploying your Dockerized application to AWS ECS Fargate — from building the image to notifying your team.
What's Included
- Docker image build with layer caching for fast repeat builds
- Push to Amazon ECR with automatic repository tagging
- Rolling ECS service update with configurable deployment circuit breaker
- Automatic rollback triggered on health check failure
- Slack notification on deployment success or failure
What You Get
deploy.yml— main workflow file, ready to drop in.github/workflows/ecs-task-definition.json— example task definition template.env.example— all required GitHub secrets listedREADME.md— setup guide and customization notes
Requirements
- AWS IAM role with ECR push and ECS deploy permissions (policy document included)
- Existing ECS cluster and service
- Slack incoming webhook URL (optional for notifications)