Are AWS AMIs discontinued?

I was looking for latest AMIs and the latest one is from end of March, there’s also no AMI for 26.05 that was recently released.

Were those images discontinued, or did something broke?

We did upload images after march but due to the bombing of various Amazon regions the script that generates the overview page of all images failed. I fixed those bugs now but there are some issues with the image pipeline ATM that I’m trying to fix due to no spot capacity available for smoke tests so that’s why 26.05 hasn’t been uploaded yet.

Images should be queryable through the AWS API though and there are more recent images there than just march

2 Likes

I see, I was just relying on NixOS Amazon Images / AMIs linked from NixOS page, but after trying the pipeline I see newer images now thanks.

I also see 26.05 but it is in eu-north-1, I’m guessing it was partial pipeline run?

1 Like

I haven’t been able to get the 26.05 images to work, only the 25.11 images.

I’m launching with this little script:

NIXOS_EC2_OWNER=427812963091

NIXOS_RELEASE=$1

if aws sts get-caller-identity; then
    echo "already logged in to aws";
else
    echo "logging in to aws"
    aws login
fi

echo "obtaining latest NixOS base image for release $NIXOS_RELEASE"

IMAGE_DETAILS=$(aws ec2 describe-images --owners $NIXOS_EC2_OWNER | jq "[ .Images[] | select(.Architecture == \"x86_64\") | select(.Name | contains(\"nixos/${NIXOS_RELEASE}\")) ] | sort_by(.CreationDate) | reverse | .[0] | {ImageId, CreationDate, DeprecationTime, Name}")

IMAGE_ID=$(echo $IMAGE_DETAILS | jq -r .ImageId);

echo "launching instance from ${IMAGE_ID}:";
echo $IMAGE_DETAILS | jq -S

aws ec2 run-instances \
    --image-id ${IMAGE_ID} \
    --instance-type t2.nano \
    --key-name "mailserver-nixos-key" \
    --subnet-id ${NIXOPS_VPC_SUBNET}

When I run this with 25.11 the EC2 instance (based on ami-07ef1aed6cc887fe7 / nixos/25.11.11994.e820eb4a444b-x86_64-linux) comes up cleanly, and inside it I see:

[root@ip-172-30-0-201:~]# ll /dev/disk/by-label/nixos 
lrwxrwxrwx 1 root root 11 Jun 18 23:27 /dev/disk/by-label/nixos -> ../../xvda2

[root@ip-172-30-0-201:~]# lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
xvda    202:0    0   5G  0 disk 
├─xvda1 202:1    0   1M  0 part 
└─xvda2 202:2    0   5G  0 part /nix/store
                                /

[root@ip-172-30-0-201:~]# fdisk -l
Disk /dev/xvda: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 97FD5997-F390-0B4A-A3F8-D106C1723AEA

Device     Start      End  Sectors Size Type
/dev/xvda1  2048     4095     2048   1M BIOS boot
/dev/xvda2  4096 10485726 10481631   5G Linux filesystem

However when I run with 26.05, the instance (based on ami-084817431bc799c16 / nixos/26.05.1947.a0374025a863-x86_64-linux) never becomes reachable by SSH, and the debug console says:

^M[*     ] A start job is running for /dev/dis…-label/nixos (1min 29s / 1min 30s)
^M[**    ] A start job is running for /dev/dis…-label/nixos (1min 29s / 1min 30s)
^M[ TIME ] Timed out waiting for device /dev/disk/by-label/nixos.
[DEPEND] Dependency failed for /sysroot.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for Mountpoints Configured in the Real Root.
[DEPEND] Dependency failed for Find NixOS closure.
[DEPEND] Dependency failed for /sysroot/run.
[DEPEND] Dependency failed for Initrd File Systems.
[DEPEND] Dependency failed for Initrd Root Device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/nixos.
[  OK  ] Stopped Dispatch Password Requests to Console Directory Watch.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target System Initialization.
[  OK  ] Started Emergency Shell.
[  OK  ] Reached target Emergency Mode.
         Starting panic-on-fail.service...
         Starting Create Volatile Files and Directories in the Real Root...
[  OK  ] Finished Create Volatile Files and Directories in the Real Root.
[   91.769814] sysrq: Trigger a crash
[   91.770194] Kernel panic - not syncing: sysrq triggered crash

My searches for “Dependency failed for File System Check on /dev/disk/by-label/nixos” haven’t turned up any other reports of this; any help is appreciated!

Please pick a different instance type than T2 for now

Note that T2 instances are not even available anymore for new customers.

T3 and T4G should work.

I will push a fix to the next AMI release thatll make it work on t2 again but i dont expect to keep supporting non-nitro instances in 26.11

I can’t test them as I can’t spawn them.

1 Like

Busy week, sorry for the delayed reply, but thank you! The newer images do boot fine for me on other instance types. I’ll keep an eye on that issue, since t2.nano is cheaper for me.