python - Error while connecting to a region under a profile -


as per document region parameter of boto.emr.emrconnection class however, follwoing error while making connection: conn = boto.emr.emrconnection(profile_name='profile_name', region='us-west-2')

file "c:\python27\lib\site-packages\boto-2.38.0-py2.7.egg\boto\emr\connection.py", line 68, in init self.region.endpoint, debug, attributeerror: 'str' object has no attribute 'endpoint'

any idea?

the method expecting regioninfo type region, not string.

so pass boto.ec2.get_region('us-west-2') instead of 'us-west-2'

import boto.ec2 boto.emr.emrconnection(profile_name='profile_name', region=boto.ec2.get_region('us-west-2')) 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -