Created
August 24, 2016 09:48
-
-
Save aloha1003/bed8d78e1fa7652541cc4126196c8ccb to your computer and use it in GitHub Desktop.
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
def downLoadImage(region, imageObj): | |
s3 = boto3.resource('s3', region_name=region) | |
bucketName = str(imageObj["Bucket"]) | |
objectName = str(imageObj["Object"]) | |
key = s3.Bucket(bucketName) \ | |
.Object(objectName) | |
saveFileName = '/tmp/'+objectName.replace('/', '__') | |
s3.meta.client.download_file(bucketName, objectName, saveFileName) | |
return saveFileName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment