Skip to main content

presign_get_object

Function presign_get_object 

Source
pub async fn presign_get_object(
    client: &Client,
    bucket: &str,
    key: &str,
    expires_secs: u64,
) -> Result<PresignedUrl, AppError>
Expand description

Generate a presigned GetObject URL for bucket/key.

§Arguments

  • client — AWS S3 client (already scoped to the correct region/profile).
  • bucket — Bucket name.
  • key — Full object key.
  • expires_secs — URL lifetime in seconds. Must be in [60, 604_800].

§Errors

  • AppError::Validation { field: "expires_secs", … } when expires_secs is outside the allowed range.
  • AppError::Internal { … } when the AWS SDK presigning call fails.