Software Engineering

The way to Scale Out an AWS ECS Service

The way to Scale Out an AWS ECS Service
Written by admin


Once you create the Amazon ECS service, it contains three Amazon ECS job replicas. You’ll be able to 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 rely

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

Output: 3

Step 2 – Set the brand new desired rely

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

It will now replace the service to have a desired rely of 5.

Step 3 – Question the up to date desired rely

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

Output: 5

About the author

admin

Leave a Comment