Editorial review: Source-derived learning material, October 2026. Employment milestones are targets, not guarantees. Hiring figures, certification details, vendor capabilities, prices and cloud costs are source claims requiring re-verification before use. Code snippets may need adaptation to current SDKs; never run cloud commands in production.
Everything runs on a laptop first. AWS is used for deployment, cloud evals and credentials, with Budgets and teardown discipline. About 80% of iterations should be local.
qwen3:8b needs ~5 GB at Q4. On 16 GB machines use Phoenix (one container) for tracing; full self-hosted Langfuse needs ~16 GB on its own.uv.lock (agent and MCP SDKs changed a lot in 2026).xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install uv git gh jq duckdb awscli node
brew install --cask docker # or OrbStack / Colima
brew install ollama && (ollama serve &)
npm install -g aws-cdk
uv --version && docker --version && ollama --version && aws --version && cdk --versionwsl --install -d Ubuntu-24.04
# Install Docker Desktop -> Settings -> Resources -> WSL Integration -> enable Ubuntu
# Install Ollama for Windows (native). From WSL reach it at http://localhost:11434
# (enable mirrored networking in .wslconfig) or use the Windows host IP.sudo apt update && sudo apt install -y git jq unzip build-essential curl
curl -LsSf https://astral.sh/uv/install.sh | sh
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip && unzip awscliv2.zip && sudo ./aws/install
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt install -y nodejs && sudo npm i -g aws-cdk
(type -p gh >/dev/null) || sudo apt install -y ghcurl -fsSL https://get.docker.com | sh && sudo usermod -aG docker $USER # log out/in
curl -LsSf https://astral.sh/uv/install.sh | sh
curl -fsSL https://ollama.com/install.sh | sh
# AWS CLI v2 + Node 22 + CDK as in the WSL blockollama pull qwen3:8b # default tool-calling model on 16 GB machines
ollama pull nomic-embed-text # local embeddings (768 dims)
# 32 GB+ RAM or 24 GB VRAM: ollama pull qwen3:30b-a3b
ollama show qwen3:8b # confirm "tools" under CapabilitiesThird-party 2026 guides rank Qwen3 8B as the default local tool-calling model; treat their reliability figures as anecdotal and measure on your golden set.
uv init analyst-copilot && cd analyst-copilot && uv python pin 3.12
uv add duckdb polars pandas pyarrow sqlglot fastapi uvicorn pydantic streamlit \
"psycopg[binary]" pgvector boto3 ollama "strands-agents[ollama]" strands-agents-tools \
"mcp[cli]" arize-phoenix-otel pyyaml httpx
uv add --dev pytest ruff moto deepeval ragas ipykernel jupyterlabservices:
postgres:
image: pgvector/pgvector:pg17
environment: {POSTGRES_USER: fde, POSTGRES_PASSWORD: fde_local_only, POSTGRES_DB: analytics}
ports: ["5432:5432"]
volumes: [pgdata:/var/lib/postgresql/data, ./sql/init:/docker-entrypoint-initdb.d:ro]
healthcheck: {test: ["CMD-SHELL", "pg_isready -U fde"], interval: 5s, retries: 10}
minio:
image: minio/minio
command: server /data --console-address ":9001"
environment: {MINIO_ROOT_USER: minio, MINIO_ROOT_PASSWORD: minio_local_only}
ports: ["9000:9000", "9001:9001"]
volumes: [miniodata:/data]
phoenix:
image: arizephoenix/phoenix:latest
ports: ["6006:6006", "4317:4317"]
jupyter:
image: quay.io/jupyter/scipy-notebook
ports: ["8888:8888"]
volumes: [./notebooks:/home/jovyan/work, ./data:/home/jovyan/data]
sandbox: # Week 9 code-interpreter target
image: quay.io/jupyter/scipy-notebook
network_mode: none
mem_limit: 2g
cpus: 1.0
volumes: [./sandbox:/home/jovyan/work, ./data/extracts:/home/jovyan/data:ro]
command: ["sleep", "infinity"]
profiles: ["sandbox"]
localstack: # optional; needs LOCALSTACK_AUTH_TOKEN; Hobby plan = non-commercial
image: localstack/localstack
environment: {LOCALSTACK_AUTH_TOKEN: "${LOCALSTACK_AUTH_TOKEN}"}
ports: ["4566:4566"]
profiles: ["aws-emu"]
volumes: {pgdata: {}, miniodata: {}}docker compose up -d && docker compose ps
# Postgres :5432 · MinIO console http://localhost:9001 · Phoenix http://localhost:6006 · Jupyter :8888
docker compose logs jupyter | grep token # Jupyter login URL
docker compose down -v # wipe volumes (re-runs init SQL)| Dataset | Use | How |
|---|---|---|
| TPC-H (DuckDB extension) | Weeks 1–8: clean schema, known answers | CALL dbgen(sf=1) |
| NYC TLC Yellow Taxi (Parquet) | Weeks 9–10: volume, dirty values, time series | Download monthly files from the TLC Trip Record Data page |
| Chinook / Northwind | Quick demos, small readable schemas | SQL scripts from their public repos |
| BIRD dev set | Eval-method practice only | Remember the documented annotation errors |
| Synthetic (Faker) | Projects 3–4: procurement, suppliers with seeded anomalies | Generator script + ground-truth file |
CREATE SCHEMA IF NOT EXISTS tpch;
CREATE ROLE agent_ro LOGIN PASSWORD 'agent_ro_local';
GRANT CONNECT ON DATABASE analytics TO agent_ro;
GRANT USAGE ON SCHEMA tpch TO agent_ro;
ALTER DEFAULT PRIVILEGES FOR ROLE fde IN SCHEMA tpch GRANT SELECT ON TABLES TO agent_ro;
ALTER ROLE agent_ro SET default_transaction_read_only = on;
ALTER ROLE agent_ro SET statement_timeout = '15s';-- One DB role per region/user; never let the model SET roles or session variables.
CREATE ROLE agent_emea LOGIN PASSWORD 'x' IN ROLE agent_ro;
ALTER ROLE agent_emea SET default_transaction_read_only = on;
ALTER TABLE tpch.orders ENABLE ROW LEVEL SECURITY;
CREATE POLICY emea_only ON tpch.orders FOR SELECT TO agent_emea
USING (o_custkey IN (
SELECT c.c_custkey FROM tpch.customer c
JOIN tpch.nation n ON c.c_nationkey = n.n_nationkey
JOIN tpch.region r ON n.n_regionkey = r.r_regionkey
WHERE r.r_name = 'EUROPE'));
-- agent_ro (no policy) now sees no orders rows: add a permissive policy for it if needed.Note: init scripts run before you load TPC-H, so default privileges cover tables created later by fde. If you load tables first, run GRANT SELECT ON ALL TABLES IN SCHEMA tpch TO agent_ro.
import sqlglot
from sqlglot import exp
ALLOWED = {"customer", "orders", "lineitem", "nation", "region", "part", "partsupp", "supplier"}
FORBIDDEN = (exp.Insert, exp.Update, exp.Delete, exp.Drop, exp.Create, exp.Alter,
exp.Command, exp.Merge)
def guard(sql: str, dialect: str = "duckdb", max_rows: int = 1000) -> str:
stmts = [s for s in sqlglot.parse(sql, read=dialect) if s is not None]
if len(stmts) != 1:
raise ValueError("Exactly one statement allowed")
root = stmts[0]
if not isinstance(root, (exp.Select, exp.Union)):
raise ValueError("Only SELECT queries allowed")
if any(True for _ in root.find_all(*FORBIDDEN)):
raise ValueError("Write/DDL detected")
ctes = {c.alias_or_name.lower() for c in root.find_all(exp.CTE)}
tables = {t.name.lower() for t in root.find_all(exp.Table)} - ctes
if any(not t for t in tables) or not tables <= ALLOWED:
raise ValueError(f"Table or table function not allowed: {sorted(tables - ALLOWED)}")
if isinstance(root, exp.Select) and not root.args.get("limit"):
root = root.limit(max_rows)
return root.sql(dialect=dialect)Layers 2–4: DuckDB read_only=True + SET enable_external_access=false; Postgres read-only role + statement_timeout; RLS per user. Cloud adds Lake Formation, Athena scan limits and AgentCore Policy (Cedar). Test table functions like read_csv(...) explicitly: confirm in your tests that the guard rejects them.
| Local | AWS counterpart | Cost control |
|---|---|---|
| DuckDB / Parquet | S3 + Glue Data Catalog + Athena | Partition data; workgroup per-query scan limit |
| MinIO | S3 | Lifecycle rules; tag project=fde-lab |
| Postgres + pgvector | Aurora PostgreSQL Serverless v2 + pgvector, or Bedrock Knowledge Bases | Stop/delete after each lab |
| Ollama (qwen3:8b) | Amazon Bedrock models | Small models for dev; log tokens per request |
| sqlglot guard + RO role + RLS | IAM + Lake Formation + AgentCore Policy (Cedar) | Policy billed per authorization request |
| FastAPI container | AgentCore Runtime or ECS Fargate (CDK) | cdk destroy each session |
| FastMCP server | AgentCore Gateway (MCP targets) | — |
| Sandboxed Jupyter | AgentCore Code Interpreter | Session timeouts |
| Phoenix | AgentCore Observability → CloudWatch | Log retention 7–14 days |
evals/run.py | AgentCore Evaluations (on-demand / online / batch) | Sample online traffic |
| — (Week 7 only) | Bedrock KB structured store on Redshift Serverless | Create, test, delete same day |
| moto | Dedicated sandbox AWS account | Budgets at 50/80/100% + Cost Anomaly Detection |
nuke:
cd infra && cdk destroy --all --force
aws s3 rm s3://$$BUCKET --recursive || true
spend:
aws ce get-cost-and-usage --time-period Start=$$(date -u +%Y-%m-01),End=$$(date -u +%Y-%m-%d) \
--granularity MONTHLY --metrics UnblendedCost --filter '{"Tags":{"Key":"project","Values":["fde-lab"]}}' Cloud spend figures in this program are planning estimates. Check current Bedrock, AgentCore, Athena, Aurora and Redshift pricing pages before each cloud week.