def __init__(self): self.__cfg = ConfigMgr() self.__bucket_name = self.__cfg.get_parameter("Instances", "NamingPrefix") self.__bucket_unique_id = EnvironmentVariables.get_storage_unique_id(self.__bucket_name) self.__bucket_policy_path = self.__cfg.get_parameter("Instances", "BucketPolicyPath") self.__current_instance_name = EnvironmentVariables.get_current_instance_name() credentials = EnvironmentVariables.get_instance_credentials().split(" ") self.__s3 = S3Connection(aws_access_key_id=credentials[0], aws_secret_access_key=credentials[1], security_token=credentials[2])
def __init__(self): self.__cfg = ConfigMgr() credentials = EnvironmentVariables.get_instance_credentials().split(" ") self.__conn = boto.ec2.EC2Connection(aws_access_key_id=credentials[0], aws_secret_access_key=credentials[1], security_token=credentials[2]) self.__conn.region = EnvironmentVariables.get_current_instance_region() self.__current_instance_name = EnvironmentVariables.get_current_instance_name()