Presigned URL workflow
Recipients receive the URL
Recipients receive a URL in the following format:
| Parameter | Description |
|---|---|
https://<hostname>/bucket/image.jpg | Path to the file in the bucket. |
X-Amz-Algorithm=AWS4-HMAC-SHA256 | Encryption algorithm used for the link signature. |
X-Amz-Credential=... | Additional info about the request (AWS region and time). |
X-Amz-Date=... | Timestamp of the link creation (format YYYYMMDDTHHmmssZ). |
X-Amz-Expires=3600 | Link lifespan in seconds. |
X-Amz-SignedHeaders=host | HTTP headers included in the signature. |
X-Amz-Signature=... | Signature that authorizes access to the file. |
Presigned URL generation
AWS CLI and S3cmd both support presigned URL generation.AWS CLI
Run the following command, replacing the placeholder values:| Parameter | Description |
|---|---|
example-bucket | The name of the bucket that contains the file. |
image.jpg | The file to share. |
60480 | Link lifespan in seconds; the maximum is 604800 (7 days). |
<storage-hostname> | The storage hostname from the Details section in the Gcore Customer Portal. |
S3cmd
The S3cmdsignurl command takes a bucket path and an expiry timestamp rather than a duration in seconds.
Run the following command, replacing the placeholder values:
| Parameter | Description |
|---|---|
example-bucket | The name of the bucket that contains the file. |
image.jpg | The file to share. |
1657457538 | Link expiry time as a Unix timestamp; use a converter to convert a date and time to Unix timestamp format. |
