Skip to content
Star
486
Star
486

S3 (RustFS)

This guide shows you how to work with AWS S3 using RustFS as a local emulator. This lab demonstrates a data pipeline using Boto3, PyArrow, and Delta Lake (delta-rs).

  1. Setup Environment:

    Open VS Code in the project folder and execute this command in the Command Palette:

    Terminal window
    > Dev Containers: Reopen in Container
  2. Run the Example:

    Terminal window
    python main.py
  1. main.py:

    • Open: Open main.py.
    • Breakpoints: Set breakpoints in the code.
    • Run: Press F5 to start debugging.
  2. Tests:

    • Open: Open a test file (e.g., tests/components/test_s3_boto.py).
    • Breakpoints: Set breakpoints in the test code.
    • Run: Use the VS Code Testing tab and click the Debug Test icon next to the test you want to debug.
  • Individually: Run tests individually from the VS Code Testing tab.
  • All tests: Run the automated script:
    Terminal window
    scripts/run_tests.sh
  • Open in your browser:
    Terminal window
    http://localhost:9001/rustfs/console/
  • Log in: Use the S3_ACCESS_KEY and S3_SECRET_KEY defined in your .env.
  • Verify: Check the bronze and silver buckets to see the uploaded files.
Terminal window
docker compose down -v
IssueSolution
RustFS API not readyEnsure the rustfs service is running and wait a few seconds for the API to initialize. Check logs with docker compose logs rustfs.
Port 9000 or 9001 in useThe S3 (MinIO) lab uses the same ports. Stop it before starting this one, or change the mapping in docker-compose.yml.