Skip to content

aws.ec2.describe_image_attribute

Example SQL Queries

SELECT * FROM
aws.ec2.describe_image_attribute
WHERE
"attribute" = 'VALUE'
AND "image_id" = 'VALUE';

Description

Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

The order of the elements in the response, including those within nested structures, might vary. Applications should not assume the elements appear in a particular order.

Table Definition

Column NameColumn Data Type
attribute Required Input Column

The AMI attribute.

Note: The blockDeviceMapping attribute is deprecated. Using this attribute returns the Client.AuthFailure error. To get information about the block device mappings for an AMI, use the DescribeImages action.

VARCHAR
image_id Required Input Column

The ID of the AMI.

VARCHAR
dry_run Input Column

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

BOOLEAN
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
block_device_mappings

The block device mapping entries.

STRUCT(
"device_name" VARCHAR,
"virtual_name" VARCHAR,
"ebs" STRUCT(
"delete_on_termination" BOOLEAN,
"iops" BIGINT,
"snapshot_id" VARCHAR,
"volume_size" BIGINT,
"volume_type" VARCHAR,
"kms_key_id" VARCHAR,
"throughput" BIGINT,
"outpost_arn" VARCHAR,
"encrypted" BOOLEAN
),
"no_device" VARCHAR
)[]
Show child fields
block_device_mappings[]
Show child fields
block_device_mappings[].device_name

The device name (for example, /dev/sdh or xvdh).

block_device_mappings[].ebs

Parameters used to automatically set up EBS volumes when the instance is launched.

Show child fields
block_device_mappings[].ebs.delete_on_termination

Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide.

block_device_mappings[].ebs.encrypted

Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EBS User Guide.

In no case can you remove encryption from an encrypted volume.

Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

This parameter is not returned by DescribeImageAttribute.

For CreateImage and RegisterImage, whether you can include this parameter, and the allowed values differ depending on the type of block device mapping you are creating.

  • If you are creating a block device mapping for a new (empty) volume, you can include this parameter, and specify either true for an encrypted volume, or false for an unencrypted volume. If you omit this parameter, it defaults to false (unencrypted).

  • If you are creating a block device mapping from an existing encrypted or unencrypted snapshot, you must omit this parameter. If you include this parameter, the request will fail, regardless of the value that you specify.

  • If you are creating a block device mapping from an existing unencrypted volume, you can include this parameter, but you must specify false. If you specify true, the request will fail. In this case, we recommend that you omit the parameter.

  • If you are creating a block device mapping from an existing encrypted volume, you can include this parameter, and specify either true or false. However, if you specify false, the parameter is ignored and the block device mapping is always encrypted. In this case, we recommend that you omit the parameter.

block_device_mappings[].ebs.iops

The number of I/O operations per second (IOPS). For gp3, io1, and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

The following are the supported values for each volume type:

  • gp3: 3,000 - 16,000 IOPS

  • io1: 100 - 64,000 IOPS

  • io2: 100 - 256,000 IOPS

For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the Nitro System. On other instances, you can achieve performance up to 32,000 IOPS.

This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS.

block_device_mappings[].ebs.kms_key_id

Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

This parameter is only supported on BlockDeviceMapping objects called by RunInstances, RequestSpotFleet, and RequestSpotInstances.

block_device_mappings[].ebs.outpost_arn

The ARN of the Outpost on which the snapshot is stored.

This parameter is not supported when using CreateImage.

block_device_mappings[].ebs.snapshot_id

The ID of the snapshot.

block_device_mappings[].ebs.throughput

The throughput that the volume supports, in MiB/s.

This parameter is valid only for gp3 volumes.

Valid Range: Minimum value of 125. Maximum value of 1000.

block_device_mappings[].ebs.volume_size

The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

The following are the supported sizes for each volume type:

  • gp2 and gp3: 1 - 16,384 GiB

  • io1: 4 - 16,384 GiB

  • io2: 4 - 65,536 GiB

  • st1 and sc1: 125 - 16,384 GiB

  • standard: 1 - 1024 GiB

block_device_mappings[].ebs.volume_type

The volume type. For more information, see Amazon EBS volume types in the Amazon EBS User Guide.

block_device_mappings[].no_device

To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

block_device_mappings[].virtual_name

The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.

NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.

boot_mode

The boot mode.

STRUCT(
"value" VARCHAR
)
Show child fields
boot_mode.value

The attribute value. The value is case-sensitive.

deregistration_protection

Indicates whether deregistration protection is enabled for the AMI.

STRUCT(
"value" VARCHAR
)
Show child fields
deregistration_protection.value

The attribute value. The value is case-sensitive.

description

A description for the AMI.

STRUCT(
"value" VARCHAR
)
Show child fields
description.value

The attribute value. The value is case-sensitive.

imds_support

If v2.0, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have HttpTokens automatically set to required so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.

STRUCT(
"value" VARCHAR
)
Show child fields
imds_support.value

The attribute value. The value is case-sensitive.

kernel_id

The kernel ID.

STRUCT(
"value" VARCHAR
)
Show child fields
kernel_id.value

The attribute value. The value is case-sensitive.

last_launched_time

The date and time, in ISO 8601 date-time format, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.

lastLaunchedTime data is available starting April 2017.

STRUCT(
"value" VARCHAR
)
Show child fields
last_launched_time.value

The attribute value. The value is case-sensitive.

launch_permissions

The launch permissions.

STRUCT(
"group" VARCHAR,
"user_id" VARCHAR,
"organization_arn" VARCHAR,
"organizational_unit_arn" VARCHAR
)[]
Show child fields
launch_permissions[]
Show child fields
launch_permissions[].group

The name of the group.

launch_permissions[].organization_arn

The Amazon Resource Name (ARN) of an organization.

launch_permissions[].organizational_unit_arn

The Amazon Resource Name (ARN) of an organizational unit (OU).

launch_permissions[].user_id

The Amazon Web Services account ID.

Constraints: Up to 10 000 account IDs can be specified in a single request.

product_codes

The product codes.

STRUCT(
"product_code_id" VARCHAR,
"product_code_type" VARCHAR
)[]
Show child fields
product_codes[]
Show child fields
product_codes[].product_code_id

The product code.

product_codes[].product_code_type

The type of product code.

ramdisk_id

The RAM disk ID.

STRUCT(
"value" VARCHAR
)
Show child fields
ramdisk_id.value

The attribute value. The value is case-sensitive.

sriov_net_support

Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

STRUCT(
"value" VARCHAR
)
Show child fields
sriov_net_support.value

The attribute value. The value is case-sensitive.

tpm_support

If the image is configured for NitroTPM support, the value is v2.0.

STRUCT(
"value" VARCHAR
)
Show child fields
tpm_support.value

The attribute value. The value is case-sensitive.

uefi_data

Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot in the Amazon EC2 User Guide.

STRUCT(
"value" VARCHAR
)
Show child fields
uefi_data.value

The attribute value. The value is case-sensitive.