S3 File Storage — Quick Reference
This guide explains how ValkyrAI uses AWS S3 for file storage and the practical steps to upload and manage files.
Quick Start
- Confirm S3 health:
curl http://localhost:8080/actuator/health/s3StorageHealth | jq .
- Initiate an upload session:
curl -X POST http://localhost:8080/v1/files/uploads/init \
-H "Content-Type: application/json" \
-d '{"fileName":"report.pdf","mimeType":"application/pdf","fileSize":12345}'
-
Upload to presigned URLs returned in the response.
-
Complete upload with part ETags:
curl -X POST http://localhost:8080/v1/files/uploads/complete \
-H "Content-Type: application/json" \
-d '{"sessionId":"...","parts":[{"partNumber":1,"eTag":"..."}]}'
When to use S3 file storage
- Large user file uploads
- Persistent artifact storage for workflows
- Encrypted/object-level access via role-based policies
Troubleshooting
- 403 / permission denied: verify role ARN & bucket policy
- 400 / invalid presigned URL: ensure region matches and token not expired
- Multipart problems: ensure ETags match the parts returned
See also: AWS S3 Integration Quick Ref