Skip to main content

S3-Backed File Storage

ValkyrAI routes file operations through a provider-agnostic StorageDriver abstraction. Production can use AWS S3 while local development uses the filesystem.

Key Facts

AreaDetail
Production backendAWS S3
Development backendLocal filesystem
CredentialsIAM role preferred; no hardcoded secrets
Tenant isolationKey prefixes by organization and space
Health checks/actuator/health/s3StorageHealth, /actuator/health/localStorageHealth
API impactUpload APIs remain stable across drivers

Development Configuration

export VALKYRAI_FILE_DRIVER=local
export VALKYRAI_FILE_SERVICE_LOCAL_ROOT=/tmp/valkyrai-files

Production Configuration

export VALKYRAI_FILE_DRIVER=s3
export VALKYRAI_FILE_SERVICE_S3_ENABLED=true
export VALKYRAI_FILE_SERVICE_S3_BUCKET=valkyr-prod-user-content
export VALKYRAI_FILE_SERVICE_S3_PREFIX=prod
export AWS_REGION=us-west-2

Health Check

curl http://localhost:8080/actuator/health/s3StorageHealth | jq .

Related: