I am trying to follow the instructions here to add an instance to my AWS ECS cluster.
So I:
- Created an autoscaling launch configuration for autoscaled instances (AMI: ami-a28476c2 us-west-2)
- The instance boots from the autoscale group with no issues, but never joins my ECS cluster
default
as the docs say it should. I sshed into the instance and cat the logs and see:
[ec2-user@ip-172-31-47-157 ~]$ cat /var/log/ecs/ecs-init.log.2016-05-10-03 2016-05-10T03:31:21Z [INFO] pre-start 2016-05-10T03:31:22Z [INFO] start 2016-05-10T03:31:22Z [INFO] No existing agent container to remove. 2016-05-10T03:31:22Z [INFO] Starting Amazon EC2 Container Service Agent 2016-05-10T03:31:23Z [ERROR] could not start Agent: API error (500): Cannot start container dbee780d6770f62afc3266ba14b77957a5e6054f94e89b2ced77f9636c4be64b: open /etc/resolv.conf: no such file or directory
So it looks like the ECS agent is failing because it can't find /etc/resolv.conf
. I have no idea why this is since I'm following the docs verbatim.
Has anyone tried this in the past? I'm not sure how to go about debugging this.