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()
I'm a newbie to both python and boto but was able to reproduce your error (or at least the last line of your error.)
You are most likely failing to export your variables in bash. if you just define then, they're only valid in the current shell, export them and python inherits the value. Thus:
$ AWS_ACCESS_KEY_ID="SDFGRVWGFVVDWSFGWERGBSDER"
will not work unless you also add:
$ export AWS_ACCESS_KEY_ID
Or you can do it all on the same line:
$ export AWS_ACCESS_KEY_ID="SDFGRVWGFVVDWSFGWERGBSDER"
Likewise for the other value. You can also put this in your .bashrc (assuming bash is your shell and assuming you remember to export)