aws-ec2-instances
Describes all of AWS account's EC2 instances.
aws-ec2-instances [profile=PROFILE] [region=REGION]
- profile=PROFILE
- The identifier of AWS connect profile
- region=REGION
- AWS region
AWS IAM Policy
To use this command, you must allow the below permissions in your AWS IAM policy:
- ec2:DescribeInstances
Output Fields
Field | Type | Name | Description |
---|---|---|---|
aws_profile | String | Connect profile | The identifier of AWS connect profile |
region | String | Region | e.g. ap-northeast-2 |
az | String | Availability Zone | e.g. ap-northeast-2a |
instance_id | String | Instance ID | e.g. i-00123456789abcdef |
instance_type | String | Instance type | e.g. m5.xlarge |
cpu_cores | Integer | CPU cores | e.g. 2 |
state_code | Integer | State code | e.g. 16, 80 |
state_name | String | State name | e.g. running, stopped |
state_reason_code | Integer | State reason code | e.g. Client.UserInitiatedShutdown |
state_reason_msg | String | State reason message | e.g. Client.UserInitiatedShutdown: User initiated shutdown |
public_ip | IP address | Public IP | |
private_ip | IP address | Private IP | |
launched_at | Date | Launched at | |
requester_id | String | Requester ID | |
owner_id | String | Owner ID | |
arch | String | Architecture | e.g. x86_64 |
iam_profile_id | String | IAM profile ID | |
iam_profile_arn | String | IAM profile ARN | |
key_name | String | Key name | |
vpc_id | String | VPC ID | |
subnet_id | String | Subnet ID | |
host_id | String | Host ID | |
group_name | String | Group name | |
image_id | String | Image ID | |
kernel_id | String | Kernel ID | |
platform | String | Platform | |
virtualization_type | String | Virtualization type | e.g. hvm |
hypervisor | String | Hypervisor | e.g. xen |
ami_launch_index | Integer | AMI launch index | e.g. 0 |
ena_support | Bool | ENA support | |
ebs_optimized | Bool | EBS optimized | |
reservation_id | String | Reservation ID | |
public_dns_name | String | Public DNS name | |
private_dns_name | String | Private DNS name | |
block_device_mappings | List | Block device mappings | Elements with device_name, volume_id, delete_on_termination, attached_at, and status properties |
security_groups | List | Security groups | Elements with group_id and group_name properties |
gpu_associations | List | GPU associations | Elements with gpu_id, gpu_assoc_id, gpu_assoc_state, and gpu_assoc_time properties |
tags | List | Tags | Elements with key and value properties |