I am trying to provision an ECS Cluster using CloudFormation. The basic context is:
- I am using the Amazon ECS–optimized AMI (e.g. ami-8fcc32f6).
- I am using an auto scaling group and a launch configuration
- I am setting UserData for the launch configuration to install some packages with
yum
.
This works but for some reason it is quite slow. It seems that the Amazon ECS–optimized AMI comes with its own scripts that install software with yum and that the yum from my UserData script is blocked by that and needs to wait until it can install additional packages.
Is there a recommended way on how to install additional packages when using the ECS-Enhanced AMI?
I currently use a simple script:
#!/bin/bash
yum update -y
yum install -y nfs-utils