使用aws CLI
,如何在给定其instanceID的情况下检索EC2实例的私有IP地址?
当我做:
aws ec2 describe-instance-status --instance-ids <instance_ID>
我得到其他信息,但不是私有IP地址,例如:
{
"InstanceStatuses": [
{
"InstanceId": "XXXXX",
"InstanceState": {
"Code": 16,
"Name": "running"
},
"AvailabilityZone": "us-east-1a",
"SystemStatus": {
"Status": "ok",
"Details": [
{
"Status": "passed",
"Name": "reachability"
}
]
},
"InstanceStatus": {
"Status": "ok",
"Details": [
{
"Status": "passed",
"Name": "reachability"
}
]
}
}
]
}