kingpin icon indicating copy to clipboard operation
kingpin copied to clipboard

AWS Actors should get Region from meta-data server if necessary

Open diranged opened this issue 11 years ago • 1 comments

If the region is not supplied, the AWS actors should be able to get it from the local metadata server via the placement-zone metadata key.

diranged avatar Feb 14 '15 19:02 diranged

Complexity arises from the fact that we instantiate connection objects in the constructor of each AWS Actor. Even though the connection object definition is lazy, the method to fetch current region (required to define the connection object) is a network call.

Possible solution is to leverage @property decorator, changing our code from

def __init__(...):
    self.ec2_conn = boto.ec2.connection(...)

to

@property
def ec2_conn(self):
    return boto.ec2.connection(...)

mikhail avatar Feb 20 '15 18:02 mikhail