通过describe_instances()调用获取ec2的“ImageId”ami id。
再看看阿美与“形容图像”呼即
$ aws --region eu-west-1 ec2 describe-images --image-ids ami-4ac6653d
{
"Images": [
{
"ProductCodes": [
{
"ProductCodeId": "aacglxeowvn5hy8sznltowyqe",
"ProductCodeType": "marketplace"
}
],
"Name": "CentOS 6 x86_64 (2014_09_29) EBS pv-1-adc4348e-1dc3-41df-b833-e86ba57a33d6-ami-809020e8.2",
"VirtualizationType": "paravirtual",
"Hypervisor": "xen",
"ImageOwnerAlias": "aws-marketplace",
"ImageId": "ami-4ac6653d",
"RootDeviceType": "ebs",
"State": "available",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda",
"Ebs": {
"DeleteOnTermination": false,
"SnapshotId": "snap-8a6c3e70",
"VolumeSize": 8,
"VolumeType": "standard",
"Encrypted": false
}
}
],
"Architecture": "x86_64",
"ImageLocation": "aws-marketplace/CentOS 6 x86_64 (2014_09_29) EBS pv-1-adc4348e-1dc3-41df-b833-e86ba57a33d6-ami-809020e8.2",
"KernelId": "aki-52a34525",
"OwnerId": "679593333241",
"RootDeviceName": "/dev/sda",
"CreationDate": "2014-10-02T20:01:16.000Z",
"Public": true,
"ImageType": "machine",
"Description": "CentOS 6 x86_64 (2014_09_29) EBS PV-1"
}
]
}
这会给OS的信息,如果自带的正版软件
查找已安装第三方软件正在运行的实例将需要一个不同的进程,不知道如何一般这样做