Pre-Signed URLs
Learn how to generate and use Pre-signed URLs with Filebase.
Last updated
Was this helpful?
Learn how to generate and use Pre-signed URLs with Filebase.
Last updated
Was this helpful?
With object storage, URLs are used to identify and access specific objects. To perform operations on objects within a private bucket, one must calculate and submit an authentication signature along with the request, which requires possession of an access key and secret access key. However, there are times when access to keys is not available. For these scenarios, a pre-signed URL can also be generated, which gives you access to perform operations on an object, but without the need to possess the access keys.
For example, you could generate a pre-signed URL to download an object from a private a bucket, and share that URL with another individual. This would grant the individual download access, without you having to share your access credentials with them.
Pre-signed URLs can also be utilized by users and customers to upload specific objects to private buckets.
It should also be noted that pre-signed URLs are only valid until the specified time and date. All actions, such as uploading and downloading objects, must be completed before the expiration time and date. A pre-signed URL can be used multiple times, as long as it is before the expiration time and date.
If you haven't used AWS CLI before, see for our guide on configuring and getting started using AWS CLI.
To create a pre-signed URL with AWS CLI:
aws s3 --endpoint https://s3.filebase.com presign s3://filebase-bucket-name/file.name
This command should return a pre-signed URL. By default, the expiration time is one hour. You can specify a different expiration time by adding the flag --expires-in
followed by the number of minutes.
This example for generating a pre-signed URL uses Python. You can generate pre-signed URLs for use with Java, JavaScript, Ruby, and .NET frameworks as well.
Additional Python and Boto3 Prerequisites:
This example uses an expiration time of 3600 seconds.
curl --request PUT --upload-file "http://your-pre-signed-url"
You will need to have installed for Python