toys

Tools and things that make my life easier - y'all might like them too

View the Project on GitHub pfuntner/toys

aws-image

Purpose

Report the details about an Amazon EC2 AMI.

Syntax

Syntax: aws-image AMI

Example

I found the AMI of an Ubuntu image I was interested in by:

  1. Going to Amazon EC2 AMI Locator
  2. Sorting the table by Version, most recent first
  3. Copying the AMI for version 21.1 for region us-east1 Ubuntu AMI example
$ aws-image ami-0a4b1fdc2301bf1f1
{
  "Architecture": "arm64",
  "BlockDeviceMappings": [
    {
      "DeviceName": "/dev/sda1",
      "Ebs": {
        "DeleteOnTermination": true,
        "Encrypted": false,
        "SnapshotId": "snap-03487b50d3f5a0b68",
        "VolumeSize": 8,
        "VolumeType": "gp2"
      }
    },
    {
      "DeviceName": "/dev/sdb",
      "VirtualName": "ephemeral0"
    },
    {
      "DeviceName": "/dev/sdc",
      "VirtualName": "ephemeral1"
    }
  ],
  "CreationDate": "2022-03-09T18:35:39.000Z",
  "Description": "Canonical, Ubuntu, 21.10, arm64 impish image build on 2022-03-09",
  "EnaSupport": true,
  "Hypervisor": "xen",
  "ImageId": "ami-0a4b1fdc2301bf1f1",
  "ImageLocation": "099720109477/ubuntu/images/hvm-ssd/ubuntu-impish-21.10-arm64-server-20220309",
  "ImageType": "machine",
  "Name": "ubuntu/images/hvm-ssd/ubuntu-impish-21.10-arm64-server-20220309",
  "OwnerId": "099720109477",
  "PlatformDetails": "Linux/UNIX",
  "Public": true,
  "RootDeviceName": "/dev/sda1",
  "RootDeviceType": "ebs",
  "SriovNetSupport": "simple",
  "State": "available",
  "UsageOperation": "RunInstances",
  "VirtualizationType": "hvm"
}
$

Notes