NixOS can be deployed to Amazon EC2 using our official AMI. We publish AMIs to all AWS regions for both `x86_64` and `arm64` on a weekly basis.
We will start deprecating and garbage collecting images older than 90 days in the future. This is why we suggest using a terraform data source or the AWS API to query for the latest AMI.
NixOS images are published under AWS Account ID
You can use terraform to query for the latest image
provider "aws" { region = "eu-central-1" } data "aws_ami" "nixos_arm64" { owners = ["_OWNER_ID_"] most_recent = true filter { name = "name" values = ["nixos/24.11*"] } filter { name = "architecture" values = ["arm64"] } } resource "aws_instance" "nixos_arm64" { ami = data.aws_ami.nixos_arm64.id instance_type = "t4g.nano" }
aws ec2 describe-images --owners _OWNER_ID_ --filter 'Name=name,Values=nixos/24.11*' 'Name=architecture,Values=arm64' --query 'sort_by(Images, &CreationDate)'
Here are the latest NixOS images available in the Amazon cloud.
Creation date | Image ID | |||
---|---|---|---|---|