Tools and things that make my life easier - y'all might like them too
aws-image
Report the details about an Amazon EC2 AMI.
Syntax: aws-image AMI
I found the AMI of an Ubuntu image I was interested in by:
$ 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"
}
$
aws
CLI directly to do the same thing but I find it easier to use the script and not have to worry about the syntax of the aws
command. The filter
parameter is especially cumbersome IMHO. The underlying command for the above example is:
aws ec2 describe-images --filter Name=image-id,Values=ami-0a4b1fdc2301bf1f1 --region us-east-1
Do you want to remember that syntax? I don’t! That’s why I created the script!
aws-images
is related script that’s very useful.