0

I've been given the task of reducing AWS costs by taking down ECS instances at night and starting them in the morning.

Up until now, I found only two methods and I wonder if any of you have any experience with it.

The first method is by having a Lambda function that is triggered by two cloudwatch events (one for the morning and one for night), this function saves the min, max and desired capacity of tasks in the ecs cluster and instances in the attached auto scaling groups in resource tags and then the next function trigger reads these tags and returns the amount of tasks/instances to same values that were configured there before taking them down.

The second method, is utilizing the autoscaling scheduled action which answers my needs but seems like a pain to manage.

I also want to be able to protect a given ecs cluster / ecs service.

We're doing IaC using Terraform and Terragrunt so this is also something to consider.

Do you know of any other methods than these two?

Itai Ganot
  • 10,424
  • 27
  • 88
  • 143

0 Answers0