How to generate file link without expiry?

amazon-ec2, amazon-s3, amazon-web-services, boto, python

Solution

According to the latest docs (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html):

A presigned URL can be valid for a maximum of seven days because the signing key you use in signature calculation is valid for up to seven days.

Since the signature itself can only be valid for seven days, there's no way for a signed URL to be valid for more than seven days. The only way to have a permanently valid URL is to make the file public.

Problem

In AWS S3 how to generate file download url for a file without expiry. ``` conn = boto.connect_s3(awsAccessKey, awsSecret) # Get bucket instance. bucket = conn.get_bucket(bktName) fileKey = bucket.get_key(fileKey) url = fileKey.generate_url(expires_in=None, query_auth=True, force_http=True) print url ``` How to generate url for file without expiry ?

Original source