Created
May 29, 2013 05:30
-
-
Save adenot/5668165 to your computer and use it in GitHub Desktop.
Getting a file from S3 and writing to the disk using authentication in python/boto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys, getopt | |
| from boto.s3.connection import S3Connection | |
| conn = S3Connection('YOURKEY', 'YOURSIGNATURE') | |
| from boto.s3.key import Key | |
| bucket = conn.get_bucket('proxy-templates') | |
| k = Key(bucket) | |
| k.key = 'web/lighttpd.conf' | |
| k.get_contents_to_filename('lighttpd.conf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment