Methods to Scale Out an AWS ECS Service


If you create the Amazon ECS service, it contains three Amazon ECS process replicas. You may see this by utilizing the describe-services command, which returns three. Use the update-service command to scale the service to 5 duties. Re-run the describe-services command to see the up to date 5.

Step 1 – Question the specified depend

aws ecs describe-services 
--cluster fargate-getting-started 
--services nginx-service 
--query 'providers[0].desiredCount'

Output: 3

Step 2 – Set the brand new desired depend

aws ecs update-service 
--cluster fargate-getting-started 
--service nginx-service 
--desired-count 5

This can now replace the service to have a desired depend of 5.

Step 3 – Question the up to date desired depend

aws ecs describe-services 
--cluster fargate-getting-started 
--services nginx-service 
--query 'providers[0].desiredCount'

Output: 5

Leave a Reply