This is a Minimal Viable Product (MVP) project developed to demonstrate integrating GraphQL with Python in an AWS Serverless environment. The main goal is to practice implementing "Code-First" schemas using reference technologies and to deploy infrastructure as code (IaC).
graph TD;
A[Client / Notebook] -- HTTP POST --> B[AWS Lambda Function URL];
B --> C[FastAPI + Mangum];
C --> D[Graphene Engine];
D -- Boto3 Resolver --> E[(Amazon DynamoDB)];
subgraph Local Development;
F[Uvicorn] --> D;
end;
-
GraphQL Engine: Implemented with Graphene following a Code-First approach.
-
Web Framework: FastAPI for efficient asynchronous execution.
-
Infrastructure: Fully deployed using Terraform.
-
Cloud Native: Runs on AWS Lambda with persistence in DynamoDB.
-
Dual Mode: Supports local execution on Linux (mocking) and real cloud deployment.
- Language / Core: Python 3.11 + Graphene API, FastAPI, Ariadne (ASGI)
- Infrastructure: Terraform (AWS)
- Services: Lambda, DynamoDB, IAM
- Tools: Boto3, Mangum, Uvicorn
Clone and configure the environment:
git clone <tu-repo-url>
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtRun the development server:
uvicorn app:app --host 0.0.0.0 --port 8000Open http://localhost:8000 in your browser to access the GraphQL Playground.
To deploy this project to your own AWS account:
pip install --target ./package -r requirements.txt
cd package && zip -r ../function.zip . && cd ..
zip function.zip app.pyterraform init
terraform applyThis project is a foundation I plan to extend with the following features:
-
Implement relationships (User -> Items).
-
Add authentication via AWS Cognito or JWT.
-
Configure CI/CD with GitHub Actions for automated deployments.
-
Advanced error handling and custom validations in Graphene.