s3:// URIs and supports custom endpoints for services like MinIO and LocalStack.
The S3 provider requires explicit configuration and the boto3 dependency.
Configuration
Configure the S3 provider incolin.toml:
colin.toml
| Field | Description | Default |
|---|---|---|
region | AWS region (e.g., us-west-2, eu-west-1) | From environment |
profile | AWS profile from ~/.aws/credentials | Default profile |
endpoint_url | Custom endpoint for S3-compatible services | AWS S3 |
AWS Credentials
The provider uses boto3’s standard credential chain. Credentials are resolved from:- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - Shared credentials file (
~/.aws/credentials) - IAM role (when running on AWS infrastructure)
colin.toml
S3-Compatible Services
Connect to MinIO, LocalStack, or other S3-compatible services by settingendpoint_url:
colin.toml
colin.toml
URI Support
The S3 provider handless3:// URIs directly with ref():
models/sources/config.md
Objects
The S3 provider returns content directly as strings throughref(). It does not expose additional template functions.
Dependency Tracking
S3 objects are tracked automatically when accessed viaref():
Staleness Detection
The S3 provider checks object freshness using HEAD requests. Colin compares the object’sLastModified timestamp against cached values to determine if content needs reloading.
This enables efficient incremental builds—documents only recompile when their S3 sources have actually changed.
Combining with LLM
Process S3 content with LLM functions:models/context/report-summary.md
Error Handling
The provider raises exceptions for access errors:| Error | Cause |
|---|---|
ValueError | Invalid URI format (missing bucket or key) |
RuntimeError | Provider not initialized (outside lifespan) |
| boto3 exceptions | AWS access errors (permissions, missing object) |
s3:GetObject permission for the bucket and key paths you access.