2016-08-21 83 views
-2
import boto3 
>>> client = boto3.client('ec2') 
    >>> response = client.create_tags(DryRun = True | False, Resources = ['ABC', ], Tags = [{ 
       'Key' : 'vennkata', 
       'Value' : 'ratnam' 
      }, ]) 
    Traceback(most recent call last) : 
    File "<stdin>", line 1, in <module> 
File "/usr/lib/python2.7/dist-packages/botocore/client.py", line 159, in _api_call 
return self._make_api_call(operation_name, kwargs) 

botocore.exceptions.EndpointConnectionError : Could not connect to the endpoint URL : "https://ec2.us-west.amazonaws.com/" 

任何人都可以提供建议,以避免此错误@创建快照时使用卷ID?Boto:帮我看看这个错误

回答

4

无法连接到端点URL:https://ec2us-west .amazonaws.com

us-west不是有效区域。目前支持的地区是us-west-1us-west-2。请参阅 AWS Regions and Endpoints - Amazon Web Services您必须错误配置区域。检查〜/ .aws/config并修复它或在shell中设置正确的值。

export AWS_DEFAULT_REGION=us-west-1 
相关问题