I have my $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY environment variables set properly, and I run this code:
import boto
conn = boto.connect_s3()
Boto will take your credentials from the environment variables. I've tested this with V2.0b3 and it works fine. It will give precedence to credentials specified explicitly in the constructor, but it will pick up credentials from the environment variables too.
The simplest way to do this is to put your credentials into a text file, and specify the location of that file in the environment.
For example (on Windows: I expect it will work just the same on Linux but I have not personally tried that)
Create a file called "mycred.txt" and put it into C:\temp This file contains two lines:
AWSAccessKeyId=
AWSSecretKey=
Define the environment variable AWS_CREDENTIAL_FILE to point at C:\temp\mycred.txt
C:\>SET AWS_CREDENTIAL_FILE=C:\temp\mycred.txt
Now your code fragment above:
import boto
conn = boto.connect_s3()
will work fine.