I have a small job in docker (10 minutes) which I want to run daily in the morning.
What I'd like to achive from AWS is this:
1. Start EC2 instance.
2. Run my docker job.
3. Shutdown EC2 instance.
What I tried so far:
- Created an ECS task.
- Created an ECS cluster with 1 machine to run the task.
I can run the task manually and it works. ECS also allows you too have scheduled tasks which is perfect.
The only issue is that EC2 instance is still running all the time.
I can scale it down to 0 instances manually, but I'm looking for a way too scale it down automatically and scale it up till run the task.
What would be the best/easiest way to achieve it?
Cheers,
Leonti