Q:

Python and boto with autoscaling -- How to connect to a region

How do I connect a connection object to a region?  I can create a connection.  I can connect to a region.  How do I link a connection object to a region
region = 'ap-southeast-2'
conn = AutoScaleConnection(aws_access_key_id, aws_secret_access_key)
autoscale = boto.ec2.autoscale.connect_to_region(region)

A:

The method connect_to_region appears in every boto module and is the best way to create a connection to a service.  The method, in this case, returns an AutoScaleConnection object so there is no need to try to create the connection object directly.  So, something like this will work:
import boto.ec2.autoscale
region = 'ap-southeast-2'
conn = boto.ec2.autoscale.connect_to_region(region, aws_access_key_id="<access_key", aws_secret_access_key="<secret_key>")
mygroups = conn.get_all_groups()
...

