Skip to content

Alternative way to connect to services #806

pilt opened this Issue Jun 9, 2012 · 0 comments

1 participant

pilt commented Jun 9, 2012

In a project of mine I use services in multiple regions and with different access keys. For example, I must use CloudSearch in us-east-1 because it unavailable in my "main" region, which is eu-west-1. I also use different access credentials for different tasks. I found that a global ~/.boto config does not mesh well with this kind of usage and needed some way to pass around a configuration for connecting, with the possibility to override parameters (region, access credentials) as needed.

The interface I come up with:

from aws import connect

default_connect = connect.with_params(region="eu-west-1", 

# Connections to various services:
dynamodb_conn = default_connect.to_dynamodb()
sqs_conn = default_connect.to_sqs()

# Services not available in eu-west-1:
us_connect = default_connect.with_params(region="us-east-1")
cloudsearch_conn = us_connect.to_cloudsearch()
swf_conn = us_connect.to_swf()

Would something like this be interesting to include in Boto?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.