Why are no Amazon S3 authentication handlers ready?

后端 未结 12 2156
广开言路
广开言路 2020-12-13 08:21

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()
         


        
12条回答
  •  一个人的身影
    2020-12-13 09:19

    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.

提交回复
热议问题