Custom ecs-optimized Amazon Linux 2 for Batch

  1. Following, it says to stop the Amazon ECS container agent w/ "sudo stop ecs". That throws an error, i assume you meant "sudo systemctl stop ecs"?

  2. I need the image to do some setup before it starts accepting containers. I understand that User Data is suggested for this ( However i found creating a custom systemd service and installing/enabling it before creating the custom AMI is a much cleaner solution. I haven't found much documentation on creating custom systemd on ecs-optimized Amazon Linux 2. The created image does correctly run the custom systemd service. Is there any potential problems with this approach instead of using User Data?

asked 5 years ago342 views
1 Answer
  1. The documentation was updated to show how to stop the ECS service sudo stop ecs was for SysV init systems while sudo systemctl stop ecs was for systemd systems.

  2. Custom systemd service continues to work well and is portable, so i stuck with that. It basically sets up some tmpfs/ramfs file systems to avoid EBS charges (traffic, storage and IO charges) during compute and sharing large input files across containers on the same instance.

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions