AWS CLI EC2 Instance Status
How to display AWS EC2 instance statuses.
<pre lang="bash">aws ec2 describe-instance-status \
--query 'InstanceStatuses[].[InstanceId,SystemStatus.Status]' \
--include-all-instances \
--region us-east-2
--profile abcdef \
Query and Filter.
<pre lang="bash">aws ec2 describe-instance-status \
--query 'InstanceStatuses[].[InstanceId,SystemStatus.Status]' \
--filter 'Name=instance-state-name,Values=stopped' \
--region us-east-2
--profile abcdef \
Filter event.code equal to instance-reboot.
<pre lang="bash">aws ec2 describe-instance-status \
--query 'InstanceStatuses[].[InstanceId,SystemStatus.Status]' \
--filter 'Name=eventcode,Values=instance-reboot' \
--region us-east-2
--profile abcdef \