Custom ecs-optimized Amazon Linux 2 for Batch

0
  1. Following https://docs.aws.amazon.com/batch/latest/userguide/create-batch-ami.html, 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 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_user_data_scripts.html). 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?

parker9
feita há 5 anos299 visualizações
1 Resposta
0
  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.

parker9
respondido há 5 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas