Scheduled Scaling Down of AWS ECS Services with Terraform to Optimize Cost Savings | Tinh Huynh Notes
Introduction To save costs, we can scale down the ECS services during off-hours and scale them up when needed1, particularly in development and testing environments. Terraform code snippet ```terraform resource “aws_appautoscaling_target” “ecs” { max_capacity = 4 min_capacity = 2 resource_id = “service/clusterName/serviceName” scalable_dimension = “ecs:service:DesiredCount” service_namespace = “ecs” } https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_scheduled_action ↩
Scheduled Scaling Down of AWS ECS Services with Terraform to Optimize Cost Savings | Tinh Huynh Notes
Introduction To save costs, we can scale down the ECS services during off-hours and scale them up when needed1, particularly in development and testing environments. Terraform code snippet ```terraform resource “aws_appautoscaling_target” “ecs” { max_capacity = 4 min_capacity = 2 resource_id = “service/clusterName/serviceName” scalable_dimension = “ecs:service:DesiredCount” service_namespace = “ecs” } https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/appautoscaling_scheduled_action ↩
https://tinhhn.github.io/posts/scheduled-scaling-down-aws-ecs-services-terraform-optimize-cost-savings/