Skip to content

A lightweight wrapper that leverages LocalStack to provide a seamless AWS S3 emulation environment for local development and testing.

License

Notifications You must be signed in to change notification settings

Anindya-Das02/s3-local-emulator

Repository files navigation

S3 Local Emulator

A lightweight, local AWS S3-compatible service powered by LocalStack. Perfect for testing and development, this emulator allows you to simulate S3 operations locally without connecting to the cloud. Test your code, debug workflows, and ensure seamless integration with AWS S3—all from your localmachine.

Provides pre-built APIs to create, delete S3 Buckets/keys, upload & download files. S3 can be accessed using localhost:4566.

How To Use:

Using Docker:

  1. Build the Dockerfile with name s3-local-py
    docker build -t s3-local-py .
  2. Run docker-compose
    docker-compose up -d
  3. Once the application starts running, you can access the swagger UI from http://localhost:8773/swagger Swagger UI
  4. Terminate the container when no longer needed.
    docker-compose down

Using Python locally:

  1. Python version 3.10+ required.
  2. Start a python virtual environment (optional).
    python -m venv .venv
    source .venv/Scripts/activate
  3. Install required packages.
    pip install -r requirements.txt
  4. Start the FastApi application
    uvicorn main:app --host 0.0.0.0 --port 8773 --reload
    This starts the fast-api server on port 8773 & with --reload flag, host reloading is enabled. Once the application starts access the swagger UI from http://localhost:8773/swagger

NOTE: In localstack once the containers are terminated, the buckets & its data is lost.

About

A lightweight wrapper that leverages LocalStack to provide a seamless AWS S3 emulation environment for local development and testing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published