0

The output of descibe-images command:

aws ec2 describe-images --image-id ami-0b898040803850657 --region us-east-1 --output json

Contains the ImageLocation line:

{
    "Images": [
        {
            "Architecture": "x86_64",
            "CreationDate": "2019-06-19T21:59:15.000Z",
            "ImageId": "ami-0b898040803850657",
            "ImageLocation": "amazon/amzn2-ami-hvm-2.0.20190618-x86_64-gp2",
            "ImageType": "machine",
            "Public": true,
            "OwnerId": "137112412989",
            "State": "available",
            "BlockDeviceMappings": [
                {
                    "DeviceName": "/dev/xvda",
                    "Ebs": {
                        "Encrypted": false,
                        "DeleteOnTermination": true,
                        "SnapshotId": "snap-08091107f3acb12b2",
                        "VolumeSize": 8,
                        "VolumeType": "gp2"
                    }
                }
            ],
            "Description": "Amazon Linux 2 AMI 2.0.20190618 x86_64 HVM gp2",
            "EnaSupport": true,
            "Hypervisor": "xen",
            "ImageOwnerAlias": "amazon",
            "Name": "amzn2-ami-hvm-2.0.20190618-x86_64-gp2",
            "RootDeviceName": "/dev/xvda",
            "RootDeviceType": "ebs",
            "SriovNetSupport": "simple",
            "VirtualizationType": "hvm"
        }
    ]
}

What is it? How can I access this location? What kind of data can I expect to find at this location?

2 Answers 2

1

For an AMI image, the ImageLocation field means different things depending on the type of AMI image it is.

EBS-Backed AMI Images:

For EBS-Backed images (EBS volume at root), the ImageLocation field is a concatenation of the image's owner (usually the 12 digit AWS account number) and the image's name.

It does not refer to an actual location (unless it refers to some AWS-known internal location). But to us, it's not an accessible location.

S3-Backed AMI Images:

For S3-Backed images (Instance store at root), the ImageLocation field is the location in S3 where the image's manifest file (XML) is located.

This location actually would be accessible if you have access to the S3 bucket.

From the AWS Management Console

In the AWS Management Console ImageLocation is displayed as "Source". When hovering over the "Source" field, the help bubble text shows:

For AMIs backed by the Amazon instance store, this is the location of the Amazon S3 source manifest. For AMIs backed by Amazon EBS, this is the owner and name of the AMI.

2
  • thank you this is helpful I was hoping to be able to find the info about os type in the manifest file but it turns out this location is of no use for me
    – grabantot
    Aug 15, 2019 at 14:54
  • @grabantot Unfortunately, the only information you'll find about OS is in the Platform field. There, it's either "Windows" or blank (which will mean Linux). You won't find any more details than that by inspecting the AMI image. If you want more detailed OS information, you'll need to actually launch an EC2 instance from the AMI image. Aug 15, 2019 at 15:05
0
ImageLocation -> (string)

The location of the AMI.

The ImageLocation is a combination of the owner and then the name of the image.

I.E: owned by me: account-number/ubuntu-1804-consul-2019-08-07T0834

owned by amazon: aws-marketplace/zs9-ubuntu14-pro-php7.0-552-619b1fcc-9dc9-4c4d-87d5-5de08f456bd7-ami-a5e920b3.4

I guess the question is why do you need to access this? what are you trying to do?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .