Skip to content
Star
478
Star
478

S3 (MinIO)

This guide shows you how to work with AWS S3 locally using MinIO and Python. This lab demonstrates how to integrate S3 libraries (Boto3, PyArrow, and Deltalake) for local data pipelines and object storage emulation.

  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:
    Terminal window
    http://localhost:9001
  • Credentials: Use the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD defined in your .env.
  • Verify: Check the bronze and silver buckets to see the uploaded files.
Terminal window
docker compose down -v