ec2_instance_metadata

EC2 instance metadata.

Platform support

Please be aware that some queries can only be run against certain platforms. Below is a list of the supported platforms that this query supports. Zercurity will automatically pause queries from running if errors are detected. Running a query against an unsupported platform will result in the following error: no such table: ec2_instance_metadata

  • Linux

Table schema

Name

Type

Description

instance_id

TEXT

EC2 instance ID

instance_type

TEXT

EC2 instance type

architecture

TEXT

Hardware architecture of this EC2 instance

region

TEXT

AWS region in which this instance launched

availability_zone

TEXT

Availability zone in which this instance launched

local_hostname

TEXT

Private IPv4 DNS hostname of the first interface of this instance

local_ipv4

TEXT

Private IPv4 address of the first interface of this instance

mac

TEXT

MAC address for the first network interface of this EC2 instance

security_groups

TEXT

Comma separated list of security group names

iam_arn

TEXT

If there is an IAM role associated with the instance, contains instance profile ARN

ami_id

TEXT

AMI ID used to launch this EC2 instance

reservation_id

TEXT

ID of the reservation

account_id

TEXT

AWS account ID which owns this EC2 instance

ssh_public_key

TEXT

SSH public key. Only available if supplied at instance launch time

Query examples

select * from ec2_instance_metadata