I’m spinning up an ec2 backed ECS cluster and the ...
# general
e
I’m spinning up an ec2 backed ECS cluster and the ASG creates instances fine and all is good, but the ECS cluster never assigns the instances to it. Does anyone have a good code example of spinning up a simple ec2 backed AWS ECS cluster? I’m using the command
ecsCluster.addAutoScalingGroup(awsxEcsClusterASG)
and thought that would be the connection to tie the 2
c
It is hard to diagnose without knowing too much about your cluster. One thing that comes to my mind is, check if you have assigned your EC2 instances and IAM role that has a policy attached to it that would allow the EC2 service to perform various ec2 and ecs actions. Here’s more about it: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/instance_IAM_role.html
e
My issue was adding lines to the userdata to register with the cluster 😞