Search code examples
amazon-ecsarm64

"start ecs" does not work on arm64 based instance a1.large


I am in the process of migrating our containers from m5.large instances to a1.large instances in our production ecs cluster.

But on this type of instance, when the user data script tries the start ecs command, I noticed it is not available anymore:

[ec2-user@ip-10-1-1-90 ~]$ start ecs
-bash: start: command not found

I am using the lattest recommended AMI (ami-0c812cd5f7b956092):

aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux-2/arm64/recommended

What am I missing ?


Solution

  • My guess is that you're using the older "Amazon Linux AMI" ECS AMI on your m5 nodes. ARM instances are only supported in Amazon Linux 2 which uses systemd.

    For any Amazon Linux 2 based AMI (arm or x86), you'll want to run systemctl start ecs instead. Also, for compatibility reasons, you can use the service style invocation on either Amazon Linux AMI or Amazon Linux 2: service ecs start.