Report this

What is the reason for this report?

Signed URLs for private objects in Spaces

Posted on September 20, 2017

Hi,

I currently have a set of files on S3 that are private. I need to temporarily generate a public, signed URL. This works with the boto API (see the code at the end). How can I do this programmatically with Spaces?

Code example:

conn = S3Connection(access_key, secret_key)

return conn.generate_url(
    expires_in=expiry_in_sec,
    method='GET',
    bucket=MediaService.__find_bucket_name_from_url(raw_url),
    key=MediaService.__find_path_from_url(raw_url),
    query_auth=True,
    force_http=(not https)
)

Does the S3 compatibility work for generate_url?

Thanks, Michael

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.