Unable to switch between two boto.cfg files
Question: I have two _boto.cfg_ files, one for QA and the other for Production. I can
choose dynamically which _boto.cfg_ to choose. When I choose QA and call
`get_all_buckets()` I get all the buckets of QA. But when I change to
Production, it still returns QA buckets. My script is in python.

Is there a way I can disable the boto connection? I have tried to exit from
Python and create a new object but it still returns QA buckets although the
_boto.cfg_ has been updated to Production credentials.


Answer: Are you sure you are picking up different credentials? There is no state
retained across different Python sessions. Try running this little script with
each config file:

    
    
    >>> import boto
    >>> print boto.config.get_value('Credentials', 'aws_access_key_id')
    

Do you get a different value printed each time? If not, you could try having
two config files, boto1.cfg and boto2.cfg and then setting the environment
variable BOTO_CONFIG to point to one or the other.

