Skip to content

Commit

Permalink
Boto no longer needs env variables, will check all locations
Browse files Browse the repository at this point in the history
Boto is now a robust aws sdk and looks for  credentials in the following places (in this order)
 1.Credentials passed into constructor
 2.Environment variables for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (what was previously coded)
 3.Named profiles in the ~/.aws/credentials file (as specified)
 4.Default profile in the ~/.aws/credentials files
 5.Named profile in the boto config
 6.Default profile in boto config
 7.Instance profile credentials (if on EC2 instance)
  • Loading branch information
zbintliff committed May 14, 2015
1 parent 830ab05 commit f4727dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/rpm-s3
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class S3Grabber(object):
base = urlparse.urlsplit(baseurl)
self.baseurl = baseurl
self.basepath = base.path.lstrip('/')
self.bucket = boto.connect_s3(os.environ['AWS_ACCESS_KEY'], os.environ['AWS_SECRET_KEY']).get_bucket(base.netloc)
self.bucket = boto.connect_s3().get_bucket(base.netloc)
self.visibility = visibility

def check(self, url):
Expand Down

0 comments on commit f4727dd

Please sign in to comment.