AWS S3 Local Development CI/CD Setup That Actually Works
Description and use
A Docker Compose stack with floci/local-aws and GitHub Actions CI provides consistent local and production S3 environments with minimal configuration.
Problem
Developers need a local S3‑compatible service that integrates with CI/CD and behaves like production, but most emulators require complex configuration.
Outcome
The setup starts in ~3 s, uses ~50 MB memory, and achieves 99.9 % reliability in production tests, eliminating configuration drift between local and production.
Workflow
- 1. Create docker-compose.yml with floci/local-aws and expose ports 4566/4572.
- 2. Mount ./data:/data for persistence and set AWS credentials and region env vars.
- 3. Build application service that depends on local‑aws and sets AWS_ENDPOINT_URL to http://local-aws:4566.
- 4. In GitHub Actions, define a service using floci/local-aws image and expose port 4566.
- 5. Checkout code, set up Node.js, install dependencies, and run tests with AWS env vars pointing to localhost:4566.
- 6. Verify tests pass locally and in CI.
- 7. (Optional) Configure CORS on local bucket for browser uploads.
- 8. Persist data across restarts via volume mapping.
Evidence
Zero config for the emulator
Startup time ~3 seconds for the full stack
Reliability 99.9% uptime in production testing
- Record date: 2026-09-21T01:00:25.612Z