An end-to-end mini project demonstrating core data engineering and cloud deployment skills:
- SQL analytics on a relational toy database
- A fully tested FastAPI service
- An AWS Lambda pipeline that fetches quotes and writes JSON to S3
- Infrastructure-as-Code with Terraform
- CI/CD via GitHub Actions (tests + Terraform deployment on main)
Originally forked from a course repository and extended independently. All implementations, refactors, tests, and CI/CD work in this repository are my own.
This repository contains three parts:
SQL queries to answer business-style questions such as:
- user purchase counts (including users with zero purchases)
- top products by total sales value
- top spender in a specific month (with handling of edge-case records)
A scheduled AWS Lambda function that:
- fetches 3 random quotes from an external API
- writes the results as JSON into an S3 bucket
- runs on a schedule (CloudWatch Event Rule / EventBridge)
Infrastructure is provisioned with Terraform (S3 buckets, IAM roles/policies, Lambda, schedule rule).
A simple REST API served locally:
GET /healthcheckreturns a 200 with a JSON messageGET /doughnuts/inforeturns doughnut data from a local JSON file Supports optional filtering:max_calories(int)allow_nuts(bool)
If no records match the filters, the API returns 200 with an empty doughnuts array.
- Python, pytest
- FastAPI
- SQL (psql)
- AWS (Lambda, S3, IAM, EventBridge/CloudWatch rule)
- Terraform
- GitHub Actions
GitHub Actions workflow:
- On Pull Requests: install dependencies and run tests for
2-cloudand3-server - On push to
main: run Terraforminit/plan/applyto deploy infrastructure
AWS credentials are provided via GitHub repository secrets.
cd 3-server
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pytest
uvicorn api.main:app --reloadTo enable automated Terraform deployments via GitHub Actions, the following repository secrets must be configured:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY
These credentials are used only at runtime by GitHub Actions and are never committed to the repository.
Note: For security reasons, secrets are not available to workflows triggered from forked pull requests.