AWS ECS services are moving to another cluster when instances fail health check

0 votes

We have started using ECS and we are not quite sure if the behaviour we are experiencing is the correct one, and if it is, how to work around it.

We have setup a Beanstalk Docker Multicontainer environment which in the background uses ECS to manage everything, that has been working just fine. Yesterday, we created a standalone cluster in ECS "ecs-int", a task definition "ecs-int-task" and a service "ecs-int-service" associated to a load balance "ecs-int-lb" and we added one instance to the cluster.

When the service first ran, it worked fine and we were able to reach the docker service through the loadbalance. While we were playing with the instance security group that is associated to the cluster "ecs-int" we mistakenly removed the port rule where the container were running, and the health check started failing on the LB resulting it in draining the instance out from it. When it happened, for our surprise the service "ecs-int-service" and the task "ecs-int-task" automatically moved to the Beanstalk cluster and started running there creating an issue for our beanstalk app.

While setting up the service we setup the placement rule we set as "AZ Balanced Spread".

Should the service move around cluster? Shouldn't the service be attached only to the cluster it was originally created to? If this is the normal behaviour though, how can we set a rule so he service even if the instances for some reason fail the health check but to stick within the same cluster?

Aug 27, 2018 in AWS by bug_seeker
• 15,320 points
50 views

1 answer to this question.

0 votes

I have re-created all the infrastructure again and the problem went away.
As I suspected, services created for one cluster should not move to different cluster when instance(s) fail.

answered Aug 27, 2018 by Priyaj
• 56,200 points

Related Questions In AWS

+5 votes
2 answers

AWS EC2 Instances are not getting to internet access

Check your VPC settings, whether you are ...READ MORE

answered Oct 16, 2018 in AWS by Omkar
• 67,290 points
567 views
0 votes
1 answer

Is it possible to stop nodes in AWS ElastiCache cluster

At this time there is not a ...READ MORE

answered Jun 20, 2018 in AWS by Flying geek
• 3,150 points
175 views
0 votes
1 answer

Deploy multiple platforms to Elastic Beanstalk

Solve by using .ebextentions to run pre-install commands in ...READ MORE

answered Nov 28, 2018 in AWS by Archana
• 5,560 points
56 views
+1 vote
1 answer

What are the interview questions that could be asked related to AWS?

Genuine answer would be that you never ...READ MORE

answered Jul 12, 2018 in AWS by Priyaj
• 56,200 points
839 views