How ajitnk-lab/flask-todo-cdk works
Project type and purpose
• This is a serverless, infrastructure-as-code project implementing a RESTful “todo” API.
• It uses AWS CDK (Python) to provision AWS resources: API Gateway, Lambda (running a Flask app), and DynamoDB.
• The goal is to demonstrate modern serverless patterns: CRUD APIs, automatic scaling, and IaC best practices.
File structure
• Top level
• app.py – CDK application entry point
• cdk.json – CDK CLI configuration
• requirements*.txt – Python dependencies for CDK and development
• scripts/ – deployment helper (deploy.sh)
• tests/ – unit tests for stacks and Lambda API
• infrastructure/
• database_stack.py – defines the DynamoDB table
• todo_stack.py – defines the API Gateway and Lambda resources, wired to the database stack
• lambda/
• todo_api/ – Flask application code (app.py, models.py) packaged for Lambda
• requirements.txt – dependencies for the Lambda environment
• scripts/ – CI/deployment automation
• tests/ – pytest tests covering infrastructure and API behavior
Extract architectural insights from README
• It calls out REST API with CORS, Python 3.11, serverless scaling, and IaC.
• Dependencies: AWS CDK (v2+), Python 3.11, Node.js 18+ for the CDK CLI.