使用aws CLI
,如何根據實例ID檢索EC2實例的私有IP地址?檢索給定實例ID的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"
}
]
}
}
]
}