The s3::sign::get function returns a pre-signed URI for a GET request on key in
bucket, valid for expires_in.
| Parameter |
Type |
Description |
bucket |
String |
The S3 bucket containing the object |
key |
String |
The key of the object to retrieve |
expires_in |
Duration |
How long the URI remains valid |
| Field |
Type |
Description |
method |
String |
The HTTP method the URI is signed for (GET) |
uri |
String |
The pre-signed URI |
expires_at |
String |
The RFC 3339 timestamp the URI expires at |
s3::sign::get('main', 'hello.txt', 5m);
Returns
"uri": "https://main.s3.amazonaws.com/hello.txt?x-id=GetObject&...",
"expires_at": "2026-09-15T12:05:00Z"
The s3::sign::put function returns a pre-signed URI for a PUT request on key in
bucket, valid for expires_in.
| Parameter |
Type |
Description |
bucket |
String |
The S3 bucket to write to |
key |
String |
The key of the object to write |
expires_in |
Duration |
How long the URI remains valid |
content_size |
Option<Number> |
If set, the URI only accepts an upload of exactly this many bytes |
| Field |
Type |
Description |
method |
String |
The HTTP method the URI is signed for (PUT) |
uri |
String |
The pre-signed URI |
expires_at |
String |
The RFC 3339 timestamp the URI expires at |
s3::sign::put('main', 'hello.txt', 5m, none);
Returns
"uri": "https://main.s3.amazonaws.com/hello.txt?x-id=PutObject&...",
"expires_at": "2026-09-15T12:05:00Z"
The s3::sign::head function returns a pre-signed URI for a HEAD request on key in
bucket, valid for expires_in.
| Parameter |
Type |
Description |
bucket |
String |
The S3 bucket containing the object |
key |
String |
The key of the object to inspect |
expires_in |
Duration |
How long the URI remains valid |
| Field |
Type |
Description |
method |
String |
The HTTP method the URI is signed for (HEAD) |
uri |
String |
The pre-signed URI |
expires_at |
String |
The RFC 3339 timestamp the URI expires at |
s3::sign::head('main', 'hello.txt', 5m);
Returns
"uri": "https://main.s3.amazonaws.com/hello.txt?X-Amz-Algorithm=...",
"expires_at": "2026-09-15T12:05:00Z"
The s3::sign::delete function returns a pre-signed URI for a DELETE request on key
in bucket, valid for expires_in.
| Parameter |
Type |
Description |
bucket |
String |
The S3 bucket containing the object |
key |
String |
The key of the object to delete |
expires_in |
Duration |
How long the URI remains valid |
| Field |
Type |
Description |
method |
String |
The HTTP method the URI is signed for (DELETE) |
uri |
String |
The pre-signed URI |
expires_at |
String |
The RFC 3339 timestamp the URI expires at |
s3::sign::delete('main', 'hello.txt', 5m);
Returns
"uri": "https://main.s3.amazonaws.com/hello.txt?x-id=DeleteObject&...",
"expires_at": "2026-09-15T12:05:00Z"