Skip to content

Instantly share code, notes, and snippets.

@gabriel4649
Created July 12, 2016 20:28
Show Gist options
  • Save gabriel4649/a17a79288c30797384a49bfae357b323 to your computer and use it in GitHub Desktop.
Save gabriel4649/a17a79288c30797384a49bfae357b323 to your computer and use it in GitHub Desktop.
Create a download link that expires using Amazon S3 with Python and the Amazon SDK
s3 = boto3.client('s3')
url = s3.generate_presigned_url('get_object',
Params = {'Bucket': 'buket-name',
'Key': 'file-name'},
ExpiresIn = 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment