Starting from Airflow version 2.9, MWAA has open-sourced the original Docker image used in our production deployments. You can refer to our open-source image repository at https://github.com/aws/amazon-mwaa-docker-images to create a local environment identical to that of MWAA. You can also continue to use the MWAA Local Runner for testing and packaging requirements for all Airflow versions supported on MWAA.
This repository provides a command line interface (CLI) utility that replicates an Amazon Managed Workflows for Apache Airflow (MWAA) environment locally.
Please note: MWAA/AWS/DAG/Plugin issues should be raised through AWS Support or the Airflow Slack #airflow-aws channel. Issues here should be focused on this local-runner repository.
Please note: The dynamic configurations which are dependent on the class of an environment are aligned with the Large environment class in this repository.
This guide provides step-by-step instructions to set up AWS MWAA Local Runner using Docker with Colima (without Docker Desktop) on macOS.
- macOS (Intel or Apple Silicon)
- Homebrew installed
- Terminal access
brew install dockerbrew install colimabrew install docker-composecolima start# Check Colima status
colima status
# Check Docker
docker --version
docker ps
# Check Docker Compose
docker-compose --versionExpected output for colima status:
time="..." level=info msg="colima is running using macOS Virtualization.Framework"
time="..." level=info msg="arch: aarch64"
time="..." level=info msg="runtime: docker"
time="..." level=info msg="mountType: sshfs"
time="..." level=info msg="socket: unix:///Users/username/.colima/default/docker.sock"
git clone https://github.com/aws/aws-mwaa-local-runner.git
cd aws-mwaa-local-runner./mwaa-local-env validate-prereqsExpected output:
Docker is Installed. ✔
docker-compose is Installed. ✔
Python3 is Installed ✔
Pip3 is Installed. ✔
The default configuration doesn't work with Colima due to SSHFS permission restrictions. We need to modify the Docker Compose configuration.
docker volume create aws-mwaa-postgres-datacp docker/docker-compose-local.yml docker/docker-compose-local.yml.backupEdit docker/docker-compose-local.yml and make the following changes:
Original problematic line (around line 14):
volumes:
- "${PWD}/db-data:/var/lib/postgresql/data"Replace with:
volumes:
- "aws-mwaa-postgres-data:/var/lib/postgresql/data"Add volumes section at the end of the file:
volumes:
aws-mwaa-postgres-data:
external: trueHere's the complete fixed file content:
version: "3.7"
services:
postgres:
image: postgres:13-alpine
environment:
- POSTGRES_USER=airflow
- POSTGRES_PASSWORD=airflow
- POSTGRES_DB=airflow
logging:
options:
max-size: 10m
max-file: "3"
volumes:
- "aws-mwaa-postgres-data:/var/lib/postgresql/data"
local-runner:
image: amazon/mwaa-local:2_10_3
restart: always
depends_on:
- postgres
environment:
- LOAD_EX=n
- EXECUTOR=Local
logging:
options:
max-size: 10m
max-file: "3"
volumes:
- "${PWD}/dags:/usr/local/airflow/dags"
- "${PWD}/plugins:/usr/local/airflow/plugins"
- "${PWD}/requirements:/usr/local/airflow/requirements"
- "${PWD}/startup_script:/usr/local/airflow/startup"
ports:
- "8080:8080"
command: local-runner
healthcheck:
test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
interval: 30s
timeout: 30s
retries: 3
env_file:
- ./config/.env.localrunner
volumes:
aws-mwaa-postgres-data:
external: true./mwaa-local-env build-imageThis step takes several minutes. Expected output includes:
Successfully built [image-id]
Successfully tagged amazon/mwaa-local:2_10_3
./mwaa-local-env startExpected output:
Creating network "aws-mwaa-local-runner-2_10_3_default" with the default driver
Creating aws-mwaa-local-runner-2_10_3-postgres-1 ... done
Creating aws-mwaa-local-runner-2_10_3-local-runner-1 ... done
Attaching to aws-mwaa-local-runner-2_10_3-postgres-1, aws-mwaa-local-runner-2_10_3-local-runner-1
# Check running containers
docker ps
# Check logs
docker logs aws-mwaa-local-runner-2_10_3-postgres-1 --tail 5
docker logs aws-mwaa-local-runner-2_10_3-local-runner-1 --tail 10- Open browser to: http://localhost:8080
- Username:
admin - Password:
test
- docker/docker-compose-local.yml - Modified PostgreSQL volume mount
- docker/docker-compose-local.yml.backup - Created as backup
- Changed PostgreSQL data storage from host directory bind mount to Docker named volume
- Added external volume definition to compose file
aws-mwaa-local-runner/
├── SETUP_GUIDE_COLIMA.md # This guide (new)
├── COLIMA_TROUBLESHOOTING.md # Troubleshooting doc (new)
├── docker/
│ ├── docker-compose-local.yml # Modified
│ ├── docker-compose-local.yml.backup # Created
│ └── ...
├── dags/ # Your DAGs go here
├── plugins/ # Custom plugins
├── requirements/ # Python requirements
│ └── requirements.txt
├── startup_script/ # Startup scripts
│ └── startup.sh
└── mwaa-local-env # Main CLI script
Place your DAG files in the dags/ directory:
# Example
cp your_dag.py dags/Edit requirements/requirements.txt:
# Test requirements installation
./mwaa-local-env test-requirementsPlace plugin files in plugins/ directory.
Modify startup_script/startup.sh for custom initialization:
# Test startup script
./mwaa-local-env test-startup-script./mwaa-local-env startPress Ctrl+C in the terminal running the containers.
./mwaa-local-env reset-db./mwaa-local-env help# Stop containers
docker-compose -p aws-mwaa-local-runner-2_10_3 -f ./docker/docker-compose-local.yml down
# Stop Colima (optional)
colima stopdocker run --rm -v aws-mwaa-postgres-data:/data -v $(pwd):/backup alpine tar czf /backup/postgres-backup.tar.gz -C /data .docker run --rm -v aws-mwaa-postgres-data:/data -v $(pwd):/backup alpine sh -c "cd /data && tar xzf /backup/postgres-backup.tar.gz"docker volume rm aws-mwaa-postgres-data
docker volume create aws-mwaa-postgres-dataIf you see chown: /var/lib/postgresql/data: Permission denied, ensure you've applied the Docker named volume fix from Step 3.
- Check Colima status:
colima status - Restart Colima:
colima stop && colima start - Check Docker connectivity:
docker ps
# Find process using port 8080
lsof -i :8080
# Kill process if needed
kill -9 <PID>- Wait 2-3 minutes for full startup
- Check container health:
docker ps - Check logs:
docker logs aws-mwaa-local-runner-2_10_3-local-runner-1
For better performance, you can configure Colima with more resources:
# Stop current instance
colima stop
# Start with custom configuration
colima start --cpu 4 --memory 8 --disk 60- Default Airflow credentials are
admin/test- change in production - Colima runs containers in an isolated VM
- PostgreSQL data is stored in Docker volumes, not directly accessible from host
Last Updated: July 23, 2025
Tested Environment:
- macOS with Apple Silicon
- Colima v0.x.x
- Docker v24.x.x
- AWS MWAA Local Runner v2.10.3