Amazon ECS-optimized Linux AMI build script
Amazon ECS has open-sourced the build scripts that are used to build the Linux variants of
the Amazon ECS-optimized AMI. These build scripts are now available on GitHub. For more
information, see amazon-ecs-ami
If you need to customize the Amazon ECS-optimized AMI , see Amazon ECS Optimized AMI Build
Recipies
The build scripts repository includes a HashiCorp
packer
For more information, see the Amazon ECS AMI repository at aws/amazon-ecs-ami
To build an Amazon ECS-optimized Linux AMI
-
Clone the
aws/amazon-ecs-amiGitHub repo.git clone https://github.com/aws/amazon-ecs-ami.git -
Add an environment variable for the AWS Region to use when creating the AMI. Replace the
us-west-2value with the Region to use.export REGION=us-west-2 -
A Makefile is provided to build the AMI. From the root directory of the cloned repository, use one of the following commands, corresponding to the Linux variant of the Amazon ECS-optimized AMI you want to build.
-
Amazon ECS-optimized Amazon Linux 2 AMI
make al2 -
Amazon ECS-optimized Amazon Linux 2 (arm64) AMI
make al2arm -
Amazon ECS GPU-optimized AMI
make al2gpu -
Amazon ECS optimized Amazon Linux 2 (Neuron) AMI
make al2inf -
Amazon ECS-optimized Amazon Linux 2023 AMI
make al2023 -
Amazon ECS-optimized Amazon Linux 2023 (arm64) AMI
make al2023arm -
Amazon ECS-optimized Amazon Linux 2023 GPU AMI
make al2023gpu -
Amazon ECS optimized Amazon Linux 2023 (Neuron) AMI
make al2023neu
-