Amazon ec2 博托';s获取所有图像函数

Amazon ec2 博托';s获取所有图像函数,amazon-ec2,boto,Amazon Ec2,Boto,我尝试使用Python boto库加载AWS图像列表。所以我的代码是 con = boto.connect_ec2(user, pasw) con.get_all_instances() con.get_all_images() 问题是,get_all_instances()工作正常,但get_all_images()没有响应。当停止kbd的应用程序时,我明白了 File "eagle/main.py", line 102, in <module> main(sys.a

我尝试使用Python boto库加载AWS图像列表。所以我的代码是

con = boto.connect_ec2(user, pasw)
con.get_all_instances()
con.get_all_images()
问题是,get_all_instances()工作正常,但get_all_images()没有响应。当停止kbd的应用程序时,我明白了

  File "eagle/main.py", line 102, in <module>
    main(sys.argv[1:])
  File "eagle/main.py", line 97, in main
    return request, process_request(request)
  File "eagle/main.py", line 45, in process_request
    request = each().process_request(request)
  File "/home/rustem/projects/eagle.2.0/eagle/../eagle/middlewares/standard.py", line 64, in process_request
    request.images = con.get_all_images()
  File "/home/rustem/envs/eagle.2.0/lib/python2.7/site-packages/boto/ec2/connection.py", line 171, in get_all_images
    [('item', Image)], verb='POST')
  File "/home/rustem/envs/eagle.2.0/lib/python2.7/site-packages/boto/connection.py", line 1063, in get_list
    body = response.read()
  File "/home/rustem/envs/eagle.2.0/lib/python2.7/site-packages/boto/connection.py", line 411, in read
    self._cached_response = httplib.HTTPResponse.read(self)
  File "/usr/lib64/python2.7/httplib.py", line 541, in read
    return self._read_chunked(amt)
  File "/usr/lib64/python2.7/httplib.py", line 590, in _read_chunked
    value.append(self._safe_read(chunk_left))
  File "/usr/lib64/python2.7/httplib.py", line 647, in _safe_read
    chunk = self.fp.read(min(amt, MAXAMOUNT))
  File "/usr/lib64/python2.7/socket.py", line 380, in read
    data = self._sock.recv(left)
  File "/usr/lib64/python2.7/ssl.py", line 241, in recv
    return self.read(buflen)
  File "/usr/lib64/python2.7/ssl.py", line 160, in read
    return self._sslobj.read(len)
KeyboardInterrupt
文件“eagle/main.py”,第102行,在
main(sys.argv[1:])
文件“eagle/main.py”,第97行,在main中
返回请求,处理请求(请求)
文件“eagle/main.py”,第45行,正在处理请求
请求=每个()。处理请求(请求)
文件“/home/rustem/projects/eagle.2.0/eagle/。/eagle/middleware/standard.py”,第64行,正在处理中
request.images=con.get_all_images()
文件“/home/rustem/envs/eagle.2.0/lib/python2.7/site packages/boto/ec2/connection.py”,第171行,在get_all_图像中
[('item',Image)],动词='POST')
文件“/home/rustem/envs/eagle.2.0/lib/python2.7/site packages/boto/connection.py”,第1063行,在get_列表中
body=response.read()
文件“/home/rustem/envs/eagle.2.0/lib/python2.7/site packages/boto/connection.py”,第411行,已读
self.\u cached\u response=httplib.HTTPResponse.read(self)
文件“/usr/lib64/python2.7/httplib.py”,第541行,已读
返回自我。读取块(金额)
文件“/usr/lib64/python2.7/httplib.py”,第590行,分块读取
value.append(self.\u safe\u read(chunk\u left))
文件“/usr/lib64/python2.7/httplib.py”,第647行,处于“安全”状态
chunk=self.fp.read(最小(金额,最大金额))
文件“/usr/lib64/python2.7/socket.py”,第380行,已读
数据=self.\u sock.recv(左)
recv中的文件“/usr/lib64/python2.7/ssl.py”,第241行
返回self.read(buflen)
文件“/usr/lib64/python2.7/ssl.py”,第160行,已读
返回self.\u sslobj.read(len)
键盘中断

看起来Boto的函数不起作用了,AWS API没有响应。有没有类似的问题?谢谢。

原因是get_all_images函数返回AWS的所有图像,因此它可以工作几分钟。我开始使用用户过滤器,现在这需要相当长的时间。

原因是get_all_images函数返回AWS的所有图像,因此它可以工作几分钟。我开始使用用户过滤器,现在这需要相当长的时间。

为什么“看起来Boto的功能不起作用”?从追踪结果来看,它似乎仍在工作。有成千上万的图像,没有分页,所以请求需要很长时间。除非绝对必要,否则我会避免。你能用过滤器返回更少的结果吗?为什么“看起来Boto的函数不起作用”?从追踪结果来看,它似乎仍在工作。有成千上万的图像,没有分页,所以请求需要很长时间。除非绝对必要,否则我会避免。可以使用筛选器返回较少的结果吗?