Skip to main content

upload_instance_files

Function upload_instance_files 

Source
pub async fn upload_instance_files(
    client: &Client,
    bucket: &str,
    tag: &str,
    instances: &[InstanceConfig],
) -> Result<InstanceFileUrls, Error>
Expand description

Uploads binary and config files for instances to S3 with digest-based deduplication.

This function:

  1. Collects unique binary and config paths across all instances
  2. Computes SHA256 digests for deduplication
  3. Uploads unique files to S3 concurrently
  4. Returns pre-signed URLs mapped by instance name

Files with identical content are uploaded only once, reducing bandwidth and storage.