scan_s3

Function scan_s3 

Source
pub async fn scan_s3(
    name: &str,
    s3_config: &S3ConnectorConfig,
) -> Result<Vec<SourceItem>>
Expand description

Scan an S3 bucket and produce SourceItems.

Uses the S3 REST API directly with AWS SigV4 signing.

§Workflow

  1. Read AWS credentials from environment variables.
  2. List all objects in the bucket (with pagination).
  3. Apply include/exclude glob filters.
  4. Download each matching object’s content.
  5. Return sorted SourceItems with S3 metadata.

§Errors

§Arguments

  • name — the instance name (e.g. "runbooks"). Used as part of the source identifier: "s3:<name>".
  • s3_config — the S3 connector configuration for this instance.

§Errors

Returns an error if:

  • AWS credentials are not set in environment
  • S3 API requests fail (network or auth errors)
  • Object listing or download fails