Simran Kaur Kahlon
Simran Kaur Kahlon

Reputation: 41

Get notification if ECS service launches a new task, if autoscaling is triggered

We have used ECS for our production setups. As per my understanding of ECS, while creating a cluster of type EC2, we specify the number of instances to be launched. When we create a service, and if autoscaling is enabled we specify the minimum and the maximum number of tasks that can be created.

While creating these tasks, if there is no space left on the existing instances, ECS launches a new instance to place these tasks.

I would like to know if we can trigger a notification whenever a new EC2 instance gets added in the ECS cluster if autoscaling is triggered? If yes, please help me with links or steps for the same.

Thanks.

Upvotes: 0

Views: 1114

Answers (1)

Terry Sposato
Terry Sposato

Reputation: 652

Should be doable, see here: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html

There are simple ways to test it via manually increasing the capacity too and are other notifications you can also subscribe too.

Upvotes: 1

Related Questions