2016-08-21 70 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 
相關問題