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 just ran into this problem while using Linux and SES, and I hope it may help others with a similar issue. I had installed awscli and configured my keys doing:
sudo apt-get install awscli
aws configure
This is used to setup your credentials in ~/.aws/config just like @huythang said. But boto looks for your credentials in ~/.aws/credentials so copy them over
cp ~/.aws/config ~/.aws/credentials
Assuming an appropriate policy is setup for your user with those credentials - you shouldn't need to set any environment variables.