Skip to main content

List and find the latest Ubuntu AMIs from cloud-images.ubuntu.com.

Project description

ubami

A module and CLI for listing and filtering the latest Ubuntu AMIs from cloud-images.ubuntu.com.

For when you'd rather not hard-code an Ubuntu AMI ID.

Installation

pip install ubami

Usage

# find the latest Jammy Jellyfish AMI for amd64+hvm:ebs-ssd in London
ami_id = ubami.find(region='eu-west-2',
                    version='22.04 LTS',
                    arch='amd64',
                    instance_type='hvm:ebs-ssd')[0]['ami_id']
# fetch a list of all the latest official Ubuntu AMIs
ami_list = ubami.list()
# first example as a shell command
ubami --region=eu-west-2 --version='22.04 LTS' --arch=amd64 --instance-type=hvm:ebs-ssd | jq -r '.[0].ami_id'
# second example as a shell command
ubami

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ubami-0.1.2.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

ubami-0.1.2-py2.py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page