示例#1
0
def cloudwatch_connect_to_region(region):
    access_key, secret_access_key = awsconf.get_accesskey_secretkey()
    try:
        conn =  boto.ec2.cloudwatch.connect_to_region(region, aws_access_key_id=access_key, aws_secret_access_key=secret_access_key)
    except:
        print "Unexpected error:", sys.exc_info()[0]
    else:
        return conn
示例#2
0
def ec2_connect_to_region(region):
    access_key, secret_access_key = awsconf.get_accesskey_secretkey()
    return boto.ec2.connect_to_region(region, aws_access_key_id=access_key, aws_secret_access_key=secret_access_key)