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
Post a Comment