Arch Linux AMIs for Amazon Web Services

From ArchWiki

Public community Arch AMIs

Note: Arch Linux currently does not offer official Amazon Machine Images. The ones listed here are created by the community.

AMIs

Arch Linux AMIs are listed here: http://arch-ami-list.drzee.net/

AMIs are build twice a month (the 1st and the 15th - 2:00am UTC) and are available for all regions that to do not explicitly require 'Opt-in' - see Region List. If an AMI is needed in a region where its currently not available, an AMI can be copied to that region.

The AMIs are EBS HVM AMIs and are available with two different kernels:

Both kernels have been tested on many different EC2 instance types (t2, t3, t3a, m/r/c5, m/r/c6 and advanced hardware with GPUs) and are booting fine.

AMIs with LTS kernels are not build.

REST API to List AMIs

An REST API is available to get a JSON of available AMIs:

Note: The API endpoint may change without warning.

First Run

After booting the AMI it is recommended/required to execute the following steps to initialize pacman and select fast repos:

# pacman-key --init
# pacman-key --populate
# reflector --country "ISO 3166-1 Alpha-2 Country Code" --protocol https,http --score 20 --sort rate --save /etc/pacman.d/mirrorlist
# pacman -Syu

The Reflector package is preinstalled in the AMIs.

Build process

Note: This section provides a short description on how the AMIs are build.

The entire build process runs on AWS and is fully automated.

Overall the automated build procedure is managed by a AWS Step Function that is executed at regular intervals using a Amazon EventBridge timed event.

The step function will initiate the build process and uses a combination of native calls and AWS Lambda functions for more complex elements.

A new set of AMIs is build, by booting an EC2 instance with the previous AMI and using it as the work or build machine. The build machine is bootstrapped with a special build script that largely follows the steps outlined here: http://mathcom.com/arch.aws.ami.html with some minor modifications, tweaks and additions. Step 7.4 is skipped as we do not need a dedicated firewall.

Following the build of the AMI the new AMI is test booted on an EC2 instance to verify that it start up correctly. If successful the AMI is distributed to the regions and registered in a DynamoDB database. The database can be queried using the API REST endpoint. Old AMIs are deleted from the regions and the DynamoDB database.

Credits

Thanks to Steven from UplinkLabs for helping to understand the build process and test the initial quality of the images. Also thanks to Mathcom for the guide, which accelerate putting the basic build process together.

You may send comments and suggestions (without any promise that they will be looked at) to: arch-ami 'at' drzee.net

Wishlist

  • Create official EC2/Cloud optimized kernels in the Standard Arch Linux repositories.
  • Add the AWS CLI v2 to the Standard Arch Linux repositories (v1 is available, but may be discontinued in the future)

Building Arch AMIs

You can also build your own Arch Linux AMI. Here are some guides:

AMI Images from Uplink Labs

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: The AMIs provided by Uplink Labs are no longer maintained (Discuss in Talk:Arch Linux AMIs for Amazon Web Services)

Uplink Labs creates new images approximately twice a month. Images are being built for a number of regions, and cover the following configurations:

  • ebs hvm x86_64 lts
  • s3 hvm x86_64 lts
  • ebs hvm x86_64 stable
  • s3 hvm x86_64 stable

AMI links and more information are available at https://www.uplinklabs.net/projects/arch-linux-on-ec2/ .