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
- Read AWS credentials from environment variables.
- List all objects in the bucket (with pagination).
- Apply include/exclude glob filters.
- Download each matching object’s content.
- 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