Companion code for Building Serverless Python Apps on AWS (Cloud Bytes Collection). Clone this repo and open the project that matches the chapter you are on.
| Folder | When to use it |
|---|---|
| sample-fastapi-graphql-starter-project | Chapter 2 — FastAPI + Strawberry starter (hello_world, local GraphQL) |
| sample-fastapi-graphql-book-api | Chapters 3–8 — Books/reviews API, MongoDB, Docker, CDK/Fargate, CI/CD |
| sample-fastapi-graphql-book-api-mcp | Chapter 9 — Same API with MCP tools (fastapi-mcp, REST routes exposed to agents) |
Each folder has its own README with environment variables, Docker notes, and deploy steps.
- Python 3.12 (see each project’s
.python-version) - uv for installs (
uv syncin each project directory) - Docker (for MongoDB and container builds in the book API projects)
- AWS CDK CLI
>= 2.1124.1when you reach the deploy chapters
cd sample-fastapi-graphql-starter-project
uv sync --all-groups
uv run pytest tests
uv run python main.pyOpen GraphiQL at http://127.0.0.1:8000/graph (see that project’s README).
cd sample-fastapi-graphql-book-api
uv sync --all-groups
docker compose up mongo # in another terminal
uv run pytest tests
uv run uvicorn main:app --reloadCopy or create a .env file using the variables listed in sample-fastapi-graphql-book-api/README.MD.
cd sample-fastapi-graphql-book-api-mcp
uv sync --all-groups
docker compose up mongo
uv run uvicorn main:app --reloadSee sample-fastapi-graphql-book-api-mcp/README.MD for MCP Inspector setup.
The Node.js book in this series uses a different repository: serverless-nodejs-dev (sample-aws-book-api-starter, sample-aws-book-api). Those projects are not part of this Python repo.
Each subproject includes its own license file (typically BSD 3-Clause). See the folder you are working in.
