Skip to content

Instantly share code, notes, and snippets.

@ashwinrs
Last active June 20, 2017 19:08
Show Gist options
  • Save ashwinrs/153e073daea691411fe72af10ef70b28 to your computer and use it in GitHub Desktop.
Save ashwinrs/153e073daea691411fe72af10ef70b28 to your computer and use it in GitHub Desktop.
Download s3 file using python3
#!/usr/bin/python3
import boto3
def get_s3_object(key, keyid, bucket, s3_file_location, local_file):
client = boto3.client('s3',aws_access_key_id=keyid,aws_secret_access_key=key)
client.download_file(bucket, s3_file_location, local_file)
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment