我正在尝试使用 boto 获取所有正在运行的实例,因此:
import boto
conn = boto.connect_ec2(aws_access_key_id='...',aws_secret_access_key='...')
conn.get_all_instances();
但是虽然我确实有一个正在运行的实例,但我得到了一个空列表。
将调试提升到 2 时,我可以看到以下内容:
[DEBUG]:validating server certificate: hostname=ec2.us-east-1.amazonaws.com, certificate hosts=['ec2.us-east-1.amazonaws.com', 'ec2.amazon...
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml;charset=UTF-8
header: Transfer-Encoding: chunked
header: Date: Sun, 16 Jun 2013 09:45:00 GMT
header: Server: AmazonEC2
2013-06-16 09:45:00,982 foo [DEBUG]:<?xml version="1.0" encoding="UTF-8"?>
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
<requestId>b30bbc2f-f553-419e-87db-6e453a3051f4</requestId>
<reservationSet/>
</DescribeInstancesResponse>
提前谢谢大家