嗨'我正在尝试获取在AWS中创建的负载均衡器。
以下是我的代码
elb_conn = boto.ec2.elb.connect_to_region(aws_access_key_id=AWSaccesskey, aws_secret_access_key=AWSsecretkey, region_name='us-east-1')
elb_conn.get_all_load_balancers(['loadbalancername'])[0]
我收到错误
Traceback (most recent call last):
File "Praload.py", line 17, in <module>
elb_conn.get_all_load_balancers(['loadbalancer1'])[0]
File "/usr/local/lib/python2.7/site-packages/boto/ec2/elb/__init__.py", line 134, in get_all_load_balancers
[('member', LoadBalancer)])
File "/usr/local/lib/python2.7/site-packages/boto/connection.py", line 1186, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.BotoServerError: BotoServerError: 400 Bad Request
<ErrorResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/">
<Error>
<Type>Sender</Type>
<Code>LoadBalancerNotFound</Code>
<Message>There is no ACTIVE Load Balancer named 'loadbalancername'</Message>
</Error>
<RequestId>131d2934-5bf6-11e7-92f6-17b72cd6bdf7</RequestId>
</ErrorResponse>
请帮我解决这个问题。
boto version = 2.47.0
python version = 2.7