Cloud images - Amazon EC2

Important:
This documentation has moved and is now maintained as part of the official Ubuntu on AWS documentation.
The up-to-date version of the content on this page is now found at: Find Ubuntu images on AWS.


Amazon Web Service’s Elastic Compute Cloud (EC2) provides a platform for deploying and running applications.

Images

On EC2, cloud images are referred to as Amazon Machine Images (AMIs). Canonical produces a wide variety of images to support numerous features found on EC2:

  • Generally, all images use Elastic Block Storage (EBS) and HVM virtualisation types. Older releases may also support PV and instance-store, but users benefit from the newer storage and virtualisation technologies.

  • Standard server images, as well as minimal images for amd64, and arm64 images for the standard server set.

  • Daily (untested) and release images are published.

Find images with SSM

The AWS Systems Manager (SSM) agent is used by Canonical to store the latest AMI release versions for EC2. This provides users with a programmatic method of querying for the latest AMI ID.

Canonical stores SSM parameters under /aws/service/canonical/. To find the latest AMI ID, users can use the AWS CLI:

aws ssm get-parameters --names \
     /aws/service/canonical/ubuntu/server/20.04/stable/current/amd64/hvm/ebs-gp2/ami-id

The path follows this format:

ubuntu/$PRODUCT/$RELEASE/stable/current/$ARCH/$VIRT_TYPE/$VOL_TYPE/ami-id
  • PRODUCT: server or server-minimal
  • RELEASE: focal, 20.04, bionic, 18.04, xenial, or 16.04
  • ARCH: amd64 or arm64
  • VIRT_TYPE: pv or hvm
  • VOL_TYPE: ebs-gp2, ebs-io1, ebs-standard, or instance-store

The given serial for an image (e.g., 20210222) is also uploaded in place of current:

ubuntu/$PRODUCT/$RELEASE/stable/$SERIAL/$ARCH/$VIRT_TYPE/$VOL_TYPE/ami-id

For more details on SSM check out this Discourse thread.

Ownership verification

Users can verify that an AMI was published by Canonical by ensuring the OwnerId field of an image is 099720109477 (in the default partition). For the GovCloud partition, the OwnerId field is 513442679011. For the China partition, the OwnerId field is 837727238323. This ID is stored in SSM and is discoverable by running:

aws ssm get-parameters --names /aws/service/canonical/meta/publisher-id

With the value returned by that command, users can then run the describe-images command against an AMI ID and verify the OwnerId field matches the above ID:

aws ec2 describe-images --image-ids $AMI_ID

Note that listings on the AWS Marketplace will always show the OwnerId as Amazon (e.g. 679593333241). In these cases, users can verify the Amazon ID and look for aws-marketplace/ubuntu in the ImageLocation field.

Image locator

Canonical also produces an Ubuntu Cloud Image Finder where users can filter down based on a variety of criteria such as region or release, etc.

AWS EKS

Amazon’s Elastic Kubernetes Service (EKS) is a managed Kubernetes service provided by AWS that lets users run Kubernetes applications in the cloud or on-premises.

Canonical provides minimized Ubuntu images customised for use with EKS. These are fully tested release images that cover all Kubernetes versions supported by the EKS service.

The latest EKS AMI ID can be found in the SSM parameter store:

aws ssm get-parameters --names /aws/service/canonical/ubuntu/eks/20.04/1.21/stable/current/amd64/hvm/ebs-gp2/ami-id

The path follows this format:

ubuntu/eks/$RELEASE/$K8S_VERSION/stable/current/$ARCH/$VIRT_TYPE/$VOL_TYPE/ami-id

For newer Kubernetes versions (>= 1.20), there are also arm64 images available (in addition to the amd64 images).

AWS Marketplace

AWS Marketplace is a digital catalogue with thousands of software listings from independent software vendors that make it easy to find, test, buy, and deploy software that runs on AWS.

Canonical maintains image listings for recent Ubuntu releases on AWS Marketplace, including images in minimal and arm64 flavors.

Those images can also be found in the SSM parameter store:

aws ssm get-parameter --name /aws/service/marketplace/<identifier>/latest

Customers can also use the AWS Marketplace to launch and subscribe to official Ubuntu Pro images that allow users to pay for additional support. These Ubuntu Pro images can also be found in the SSM parameter store.

Not all releases are in GovCloud at this time (a list of available products is shown below). To query GovCloud, be sure to use a GovCloud region and credentials:

aws --region us-gov-west-1 --profile govcloud ssm get-parameter --name /aws/service/marketplace/<identifier>/latest

Please use this chart to find the product identifier and availability:

Name Architecture identifier GovCloud
Ubuntu 20.04 LTS amd64 prod-x7h6cigkuiul6 :heavy_check_mark:
Ubuntu 20.04 LTS arm64 prod-gprrntd234sfc :heavy_check_mark:
Minimal Ubuntu 20.04 LTS amd64 prod-df2jln3gjtwps :heavy_check_mark:
Minimal Ubuntu 20.04 LTS arm64 prod-emtsb6upxf6us :heavy_check_mark:
Ubuntu 22.04 LTS amd64 prod-lfutkwiaknxsk :heavy_check_mark:
Ubuntu 22.04 LTS arm64 prod-amd2rg3s3i7tc :heavy_check_mark:
Minimal Ubuntu 22.04 LTS amd64 prod-smq32swynllqw :heavy_check_mark:
Minimal Ubuntu 22.04 LTS arm64 prod-zvdejcufto6ps :heavy_check_mark:
Ubuntu 23.04 amd64 prod-5k5cl7gpbkr26 :heavy_check_mark:
Ubuntu 23.04 arm64 prod-ad4brywknigv4 :heavy_check_mark:
Minimal Ubuntu 23.04 amd64 prod-4q2ov7d2gozxk :heavy_check_mark:
Minimal Ubuntu 23.04 arm64 prod-wq7aqb3abhaay :heavy_check_mark:
Ubuntu 23.10 amd64 prod-tx7uupluohrfk :heavy_check_mark:
Ubuntu 23.10 arm64 prod-2ajtlwthyvpc6 :heavy_check_mark:
Minimal Ubuntu 23.10 amd64 prod-segy4h4e5x5zq :heavy_check_mark:
Minimal Ubuntu 23.10 arm64 prod-xxfuncfabpasi :heavy_check_mark:
Ubuntu Pro FIPS 16.04 LTS amd64 prod-hykkbajyverq4 :heavy_check_mark:
Ubuntu Pro FIPS 18.04 LTS amd64 prod-7izp2xqnddwdc :heavy_check_mark:
Ubuntu Pro FIPS 20.04 LTS amd64 prod-k6fgbnayirmrc :heavy_check_mark:
Ubuntu Pro 14.04 LTS amd64 prod-7u42cjnp5pcuo :heavy_check_mark:
Ubuntu Pro 16.04 LTS amd64 prod-f6ogoaqs7lwre :heavy_check_mark:
Ubuntu Pro 18.04 LTS amd64 prod-jlgu4232gpnwa :heavy_check_mark:
Ubuntu Pro 20.04 LTS amd64 prod-3sk4unyn4iwqu :heavy_check_mark:
Ubuntu Pro 22.04 LTS amd64 prod-uwytposjsg3du :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.23 amd64 prod-d6nvbzhhqtsnc :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.23 arm64 prod-w4kdatfulcfk2 :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.24 amd64 prod-q56ww7nfnmv72 :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.24 arm64 prod-pikds4f276lq6 :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.25 amd64 prod-h232pdamfnj5w :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.25 arm64 prod-exeixbb2fbrog :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.26 amd64 prod-paebp5ekgg6uu :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.26 arm64 prod-lrqczh7vqe7ve :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.27 amd64 prod-ldmift6l2jtbk :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.27 arm64 prod-rmbj4hjbxq3s4 :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.28 amd64 prod-liwkeak7e3q7e :heavy_check_mark:
Ubuntu 20.04 LTS for EKS 1.28 arm64 prod-lnp3hmtlqxkes :heavy_check_mark:

It would be nice if this article would definitely state whether or not “513442679011” is Canonicals GovCloud OwnerId. I wonder if there are any other possible valid values for OwnerId

@space-ops done. And, yes, 513442679011 is the Canonical OwnerId in GovCloud.

PRODUCT: server or `server-minimal

Would be nice if you can mention pro-server for Ubuntu Pro. Was looking for it for my CloudFormation template. Managed to find it from Ubuntu Pro is now part of the AWS EC2 console