EC2 instance not joining ECS Cluster

You need to use an ECS AMI,

Or you need to install the ECS agent

http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html

And then you need to start/restart the ecs agent after changing that config

restart ecs

Restart ECS does not fix the issue.

In my case i check logs under

/var/logs/ecs

tail -f ecs-agent.log.2018-09-05-15

So I notice

2018-09-05T15:26:22Z [ERROR] Could not register: NoCredentialProviders: no valid providers in chain. Deprecated.
    For verbose messaging see aws.Config.CredentialsChainVerboseErrors

Just Assign ECS role and instance registered with the cluster.

Maybe this answer helps some.