https://cdn.amazonlinux.com/os-images/2.0.20210721.2/kvm/amzn2-kvm-2.0.20210721.2-x86_64.xfs.gpt.qcow2
Find the AMIs (newest last)
$ aws ec2 describe-images --region eu-west-1 --owners amazon --filters 'Name=name,Values=amzn2-ami-hvm-*-x86_64-gp2' 'Name=state,Values=available' --output json | jq -r '.Images | sort_by(.CreationDate)'
{ "Architecture": "x86_64", "CreationDate": "2021-11-09T04:50:55.000Z", "ImageId": "ami-09d4a659cdd8677be", "ImageLocation": "amazon/amzn2-ami-hvm-2.0.20211103.0-x86_64-gp2", "ImageType": "machine", "Public": true, "OwnerId": "137112412989", "PlatformDetails": "Linux/UNIX", "UsageOperation": "RunInstances", "State": "available", "BlockDeviceMappings": [ { "DeviceName": "/dev/xvda", "Ebs": { "DeleteOnTermination": true, "SnapshotId": "snap-0f312650dadc31d95", "VolumeSize": 8, "VolumeType": "gp2", "Encrypted": false } } ], "Description": "Amazon Linux 2 AMI 2.0.20211103.0 x86_64 HVM gp2", "EnaSupport": true, "Hypervisor": "xen", "ImageOwnerAlias": "amazon", "Name": "amzn2-ami-hvm-2.0.20211103.0-x86_64-gp2", "RootDeviceName": "/dev/xvda", "RootDeviceType": "ebs", "SriovNetSupport": "simple", "VirtualizationType": "hvm" }
You'll also find VirtualBox, Hyper-V and VMWare ready images in there.
(and also arm64 ones)
https://aws.amazon.com/blogs/compute/query-for-the-latest-am...
ISTR there’s also an SNS topic you can subscribe to if you want to do something automatically on new AMI release.
Find the AMIs (newest last)
$ aws ec2 describe-images --region eu-west-1 --owners amazon --filters 'Name=name,Values=amzn2-ami-hvm-*-x86_64-gp2' 'Name=state,Values=available' --output json | jq -r '.Images | sort_by(.CreationDate)'
From the information returned you have to stich the version numbers and filenames into this format: And if you did it right, you can now download the file.