Amazon S3 Aws - Generate unsigned object download URLs

This python code generates unsigned URL to download a public file from Amazon S3 storage.
Note that unsigned URL can be generated for object with public acl.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
# Create an unsigned download URL for hello.txt. # Requirements: # file hello.txt is public by setting its ACL # Get hello.txt file key from bucket hello_key = bucket.get_key('hello.txt') # Create the unsigned URL hello_url = hello_key.generate_url(0, query_auth=False, force_http=True) print hello_url

Other Steps and Solutions

If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus