Proof-of-concept monolithic FastAPI app running on one EC2 instance in us-east-1.
- Python 3.12 + FastAPI + Jinja2 + Tailwind (CDN)
- SQLite (local EBS)
- Bedrock (Claude 3 Haiku) with graceful fallback
- Nginx + systemd
- Deterministic simulation + SSE live playback
# 1. Clone this repo
git clone <your-repo> gotm-sim && cd gotm-sim
# 2. Deploy infrastructure
cd terraform
terraform init
terraform apply -auto-approve
# 3. EC2 will self-bootstrap via user_data.sh -> scripts/bootstrap.sh
# Optional: deploy from your own fork/branch
terraform apply -auto-approve \
-var='repo_url=https://github.com/<you>/gotm-sim.git' \
-var='repo_branch=<your-branch>'Use this when developing locally and you don't want AWS Bedrock dependency.
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
BEDROCK_ENABLED=false PYTHONPATH=. ./venv/bin/python -m scripts.init_db
BEDROCK_ENABLED=false ./venv/bin/uvicorn app.main:app --reload --host 127.0.0.1 --port 8000Then open http://127.0.0.1:8000.
BEDROCK_ENABLEDdefaults totrue.- Set
BEDROCK_ENABLED=falseto force deterministic fallback mode. - In AWS, keep
BEDROCK_ENABLED=trueand ensure IAM + Bedrock model access are enabled.