Boto will accept your credentials from environment variables. I tested this with V2.0b3 and it works great. It will give priority to the credentials specified explicitly in the constructor, but it will also receive credentials from environment variables.
The easiest way to do this is to put your credentials in a text file and specify the location of this file in the environment.
For example (on Windows: I expect it to work exactly the same on Linux, but I personally did not)
Create a file called "mycred.txt" and place it in the C: \ temp folder. This file contains two lines:
AWSAccessKeyId=<your access id> AWSSecretKey=<your secret key>
Define the AWS_CREDENTIAL_FILE environment variable to point to C: \ temp \ mycred.txt
C:\>SET AWS_CREDENTIAL_FILE=C:\temp\mycred.txt
Now your code snippet is above:
import boto conn = boto.connect_s3()
will work fine.
liamf Apr 29 2018-11-11T00: 00Z
source share