Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

AWS S3 Local Development CI/CD Setup That Actually Works

Описание и применение

Настройка локального S3‑эмулятора с Docker Compose и GitHub Actions обеспечивает единообразие среды разработки и CI, минимизируя конфигурацию.

Задача

Developers need a local S3‑compatible service that integrates with CI/CD and behaves like production, but most emulators require complex configuration.

Результат

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.

Рабочий процесс

  • 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.

Доказательства

Zero config for the emulator

Источник

Startup time ~3 seconds for the full stack

Источник

Reliability 99.9% uptime in production testing

Источник

  • Дата записи: 2026-09-21T01:00:25.612Z