gbvanrenswoude / aws-ecs-simple-service-scheduler

Simple Service Scheduler for AWS ECS Services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple MVP ECS service scheduler.

Simple service scheduler for ECS. Queries out all running clusters. For each cluster, describes services and their tags.
If the tag NoAutoOff is set with the value to true, will skip taking action on the service.
If the tag DesiredCountUp is set to n, will update the service to desiredcount n at 7am.
If the tag DesiredCountDown is set to n, will update the service to desiredcount n at 7pm.
Cloudwatch rules will fire 2 events called 7amweekdays and 7pmweekdays every workday to trigger the scaling up and scaling down.
Their json payload is:
{'rulename': '7amweekdays', 'behavior': 'scaleup'}
{'rulename': '7pmweekdays', 'behavior': 'scaledown'}
Does not support setting times, since it is running stateless

Sample input:

{'rulename': '7amweekdays', 'behavior': 'scaledown'}

Deployment

Deployment is handled by Concourse across branches. Concourse is not configured to enforce version tracking across the git flow. (meaning commits to every branch will just run the pipeline for that branch.)
Master branch pipeline: CI

Note

Check your timezone setting in the template.yaml.

About

Simple Service Scheduler for AWS ECS Services


Languages

Language:Python 100.0%