A fully serverless, secure, and scalable Todo List web application built entirely with native AWS services. This project demonstrates modern cloud-native architecture patterns without any server management requirements.
This project showcases the development of a production-ready serverless application that includes:
- User Authentication with JWT tokens
- Secure CRUD operations for todo management
- Real-time UI updates with dynamic feedback
- Multi-tenant data isolation per user
- Comprehensive monitoring and logging
The application follows a modern serverless architecture leveraging fully managed AWS services:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ React โโโโโถโ Amazon โโโโโถโ Amazon โโโโโถโ AWS โโโโโถโ Amazon โ
โ Frontend โ โ Cognito โ โ API โ โ Lambda โ โ DynamoDB โ
โ (Amplify) โ โ (Auth & JWT) โ โ Gateway โ โ (Python) โ โ (NoSQL) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
- Frontend: React SPA hosted on AWS Amplify with SSL and CDN
- Authentication: Amazon Cognito User Pools with hosted UI and JWT tokens
- API Layer: Amazon API Gateway (HTTP API) with JWT authorizers
- Compute: AWS Lambda functions (Python) for all business logic
- Database: Amazon DynamoDB with user-based data partitioning
- Monitoring: Amazon CloudWatch for logs and application insights
- Security: AWS IAM with least-privilege access policies
- โ Secure Authentication: Cognito-managed sign-in/sign-out with JWT
- โ CRUD Operations: Create, read, update, and delete todos
- โ User Isolation: Each user sees only their own todos
- โ Real-time Updates: Dynamic UI with immediate feedback
- โ Token Management: Automatic session validation and renewal
- โ CORS Handling: Proper cross-origin request management
- โ Error Handling: Graceful degradation and user-friendly messages
- โ Responsive Design: Works across desktop and mobile devices
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React (Vite) | Modern UI framework with fast build tooling |
| Hosting | AWS Amplify | Serverless static site hosting with SSL |
| Authentication | Amazon Cognito | Managed user authentication and JWT tokens |
| API | API Gateway (HTTP API) | RESTful API endpoints with JWT authorization |
| Compute | AWS Lambda (Python) | Serverless function execution |
| Database | Amazon DynamoDB | NoSQL database with automatic scaling |
| Monitoring | Amazon CloudWatch | Centralized logging and application monitoring |
| Security | AWS IAM | Identity and access management |
- AWS Account with appropriate permissions
- Node.js 18+ and npm/yarn
- Python 3.9+ for Lambda development
- AWS CLI configured (optional, for advanced deployment)
git clone https://github.com/yourusername/serverless-todo-app.git
cd serverless-todo-appcd frontend
npm install
npm run devCreate a DynamoDB table with:
- Table Name:
TodoItems - Partition Key:
user_id(String) - Sort Key:
todo_id(String)
Deploy the following Python Lambda functions:
create-todo- Creates new todo itemsget-todos- Retrieves user's todo listdelete-todo- Removes specific todo items
Configure HTTP API with routes:
POST /create-todoGET /get-todosDELETE /delete-todo/{todoId}
- Create User Pool with hosted UI
- Configure app client with appropriate OAuth flows
- Set up JWT authorizer in API Gateway
Update your React app with the correct AWS resource endpoints and IDs.
- JWT Authentication: All API calls require valid Cognito tokens
- User Data Isolation: DynamoDB partition key ensures user separation
- Least Privilege IAM: Lambda functions have minimal required permissions
- CORS Protection: API Gateway configured for specific origin access
- Token Validation: Frontend validates token expiry before API calls
- Secure Headers: Proper HTTPS and security headers implementation
- Ensure API Gateway has proper CORS configuration
- Verify OPTIONS method is configured for preflight requests
- Check that Lambda responses include proper
application/jsoncontent-type
- Validate token format and expiration in frontend
- Confirm Cognito User Pool configuration matches API Gateway authorizer
- Check CloudWatch logs for detailed error messages
- Verify IAM role has proper DynamoDB permissions
- Ensure table name matches in Lambda environment variables
- Check that partition key (
user_id) is correctly extracted from JWT
The application includes comprehensive logging via Amazon CloudWatch:
- Lambda Logs: Function execution, errors, and performance metrics
- API Gateway Logs: Request/response tracking and integration errors
- DynamoDB Metrics: Read/write capacity and throttling alerts
Access logs through:
# View Lambda logs
aws logs describe-log-groups --log-group-name-prefix "/aws/lambda/"
# Tail specific function logs
aws logs tail /aws/lambda/your-function-name --follow- Infrastructure as Code: Migrate to AWS CDK or CloudFormation
- CI/CD Pipeline: Automated testing and deployment
- Enhanced Monitoring: AWS X-Ray tracing and custom CloudWatch dashboards
- Secrets Management: AWS Systems Manager Parameter Store integration
- Multi-Region: DynamoDB Global Tables for geographic distribution
- Advanced Features: Due dates, categories, search functionality
- Notifications: SNS/SES integration for reminders
- Mobile App: React Native or native mobile clients
This serverless architecture automatically scales to handle varying loads:
- Lambda: Automatic concurrency scaling up to account limits
- DynamoDB: On-demand billing with automatic scaling
- API Gateway: Built-in scalability for millions of requests
- Amplify: Global CDN distribution for fast content delivery
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- AWS Documentation and best practices
- React and Vite communities
- Serverless architecture patterns and examples
If you encounter any issues or have questions:
- Check the Issues page for existing solutions
- Review AWS CloudWatch logs for detailed error information
- Consult AWS documentation for service-specific troubleshooting
- Create a new issue with detailed reproduction steps
Built with โค๏ธ using AWS Serverless Services