ECS Deployer¶
ECS Deployer allows you to easily deploy containerized applications to AWS ECS Fargate. It simplifies the process of creating task definitions, running pre-deployment tasks, setting up scheduled jobs, as well as service orchestration.
Applications can easily and securely be deployed with a simple GitHub Action.
Features¶
- Service creation/updating
- Scheduled Jobs/Cron
- Pre Deploy Tasks
- Spot Containers
- Automatic Logging Setup
- GitHub Actions support
- Seamless integration with Remote Shell to easily debug your application
Resources ECS Deployer Manages¶
- ECS Services
- ECS Task Definitions
- EventBridge Scheduler Schedules and ScheduleGroup (For CronJobs)
- Creation only of CloudWatch Log Groups (if desired)
Resources ECS Deployer DOES NOT manage¶
- ECS Cluster
- ECR Repositories/Registry
- SSM Secrets
- Load Balancers / Target Groups
- IAM Roles
- VPC Resources
Example Config¶
.ecsdeployer.yml
project: simple-http
cluster: default
image:
ecr: simple-http
tag: "{{ .ImageTag }}"
task_defaults:
cpu: 512
memory: 2x
network:
public_ip: false
subnets:
- subnet-111111111
- subnet-222222222
security_groups:
- sg-111111111
- sg-222222222
services:
- name: web
command: ["httpd", "-p", "8080"]
desired: 3
load_balancer:
port: 8080
target_group: simple-http-web
Basic Flow¶
flowchart TD
A[Start] --> B{{Has PreDeploy?}};
subgraph predeploy[Run PreDeploy Tasks]
direction LR
PD1 --> PD2[...]
PD2 --> PDN
end
subgraph svc[Service Deployment]
direction TB
svc1[http] --> swait{{Wait for stability}}
svc2[...] --> swait
svc3[worker] --> swait
cus{{Create/Update Services}} --> svc1
cus --> svc2
cus --> svc3
end
B -->|Yes| predeploy;
B -->|No|C{{Cronjobs}};
predeploy --> C;
C --> svc;
svc --> D{{Deregister Old Tasks}}
D --> E[Success!]