What is a presigned URL?
A presigned URL is a temporary link used to access a private file in the storage. Such links can be generated only by those who have access keys (Access key and Secret key) from the storage. As a rule, this is a storage owner. This is how you work with the presigned URLs: 1. A storage owner sets the link expiry date and generates a presigned URL. 2. The owner sends the generated link to the users for whom he/she wants to make the file accessible. 3. The users receive a link as follows:

Generate a presigned URL
We have prepared a guide to generate a presigned URL for two storage management utilities: AWS CLI and S3cmd.Generate links in AWS CLI
1. Open a command-line tool and navigate to the AWS directory. 2. Paste the command below into AWS and replace the values with your own ones:- example-bucket — the name of the bucket that hosts the file,
- image.jpg — the file you want to share,
- 60480 — link lifespan in seconds, the maximum is 7 days,
- s-dt2.cloud.gcore.lu — the hostname of your storage that can be found in the “Details” of the Object Storage in the Gcore Customer Portal.
Generate links in S3cmd
1. Open a command-line tool and navigate to the S3cmd directory. 2. Paste the command below into S3cmd and replace the values with your own ones:- example-bucket — the name of the bucket that hosts the file,
- image.jpg — the file you want to share,
- 1657457538 — link expiry time in the Timestamp format, use the converter to convert time formats.
- example-bucket — the name of the bucket that hosts the file,
- image.jpg — the file you want to share,
- $(echo “
date +%s
+ 3600 * 24 * 7 ” | bc) — 7-day offset of the link expiry time.