Functions
generate-presigned-delete-url
fn (bucket: Str, key: Str, expires_in: Int): Str
fn (bucket: Str, key: Str): Str
Generate a presigned URL for deleting an S3 object.
The URL allows temporary delete access without credentials. expires_in is in seconds (default 3600 = 1 hour, max 604800 = 7 days).
Example
url ::aws::s3::presigned/generate-presigned-delete-url("my-bucket", "path/to/file.txt", 3600)
generate-presigned-upload-url
fn (bucket: Str, key: Str, expires_in: Int): Str
fn (bucket: Str, key: Str): Str
Generate a presigned URL for uploading an S3 object.
The URL allows temporary upload access without credentials. expires_in is in seconds (default 3600 = 1 hour, max 604800 = 7 days).
Example
// Generate a 1-hour upload URL
url ::aws::s3::presigned/generate-presigned-upload-url("my-bucket", "uploads/file.txt", 3600)
// Upload using the presigned URL (no AWS credentials needed)
::http ::hot::http
::http/put(url, "File content here")
generate-presigned-url
fn (bucket: Str, key: Str, expires_in: Int): Str
fn (bucket: Str, key: Str): Str
Generate a presigned URL for downloading an S3 object.
The URL allows temporary access to the object without credentials. expires_in is in seconds (default 3600 = 1 hour, max 604800 = 7 days).
Example
// Generate a 1-hour download URL
url ::aws::s3::presigned/generate-presigned-url("my-bucket", "path/to/file.pdf", 3600)
// => "https://my-bucket.s3.amazonaws.com/path/to/file.pdf?X-Amz-Algorithm=..."
// Download using the presigned URL (no AWS credentials needed)
::http ::hot::http
response ::http/get(url)
response.body // => file contents