This project demonstrates a serverless application architecture using AWS services. It's a simple To-Do List application that showcases:
- AWS Lambda - For serverless compute
- API Gateway - For API management
- AWS WAF - For API security
- IAM - For secure access control
- CloudWatch - For logging and monitoring
Additional services:
- DynamoDB for data storage
- AWS Amplify for hosting the frontend
- GitHub Actions for CI/CD
The application follows a serverless architecture pattern:
- React frontend hosted on AWS Amplify
- API Gateway providing RESTful endpoints
- Lambda functions for backend business logic
- DynamoDB for data persistence
- WAF for API protection
- CloudWatch for monitoring and logging
- Create, read, update, and delete to-do items
- Secure API with API keys and WAF protection
- Automated deployments with GitHub Actions
- Comprehensive logging with CloudWatch
- AWS Account
- GitHub Account
- AWS CLI installed and configured
- Node.js and npm
- AWS SAM CLI
-
Clone the repository:
git clone https://github.com/yourusername/todo-serverless-app.git cd todo-serverless-app -
Install dependencies:
# For Lambda functions cd lambda npm init -y npm install aws-sdk uuid cd .. # For frontend npm install -
Start the frontend locally:
npm start -
Test Lambda functions locally:
sam local invoke GetTodosFunction
-
Deploy the backend with SAM:
sam build sam deploy --guided -
Build and deploy the frontend to Amplify:
npm run build # Then deploy to Amplify Console manually or using the AWS CLI
-
Set up the following secrets in your GitHub repository:
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGION
-
Push changes to the main branch to trigger the workflow:
git add . git commit -m "Update application" git push origin main
This application implements several security measures:
- IAM roles with least privilege principle
- API Keys for API access control
- WAF for protecting against common web exploits
- CloudWatch logging for audit and monitoring
- All Lambda functions log to CloudWatch Logs
- API Gateway access logs are stored in CloudWatch
- WAF logs are available for security monitoring