Inspiration As cloud-native architectures become increasingly popular, I wanted to explore how AWS serverless technologies like Lambda and API Gateway could be combined to build scalable APIs with observability and access control features. The goal was to simulate a real-world backend workflow that includes versioning, canary deployment, monitoring, CORS configuration, and authentication.
What it does This project sets up a fully serverless REST API using AWS Lambda and API Gateway. It includes:
- Lambda functions to serve API responses.
- API Gateway to expose and manage REST endpoints.
- CloudWatch for log monitoring.
- Canary deployment for safe feature rollout.
- CORS configuration for cross-origin access.
- A Lambda Authorizer that validates JWT tokens to secure endpoints.
How we built it We built it step-by-step as follows:
- Created multiple AWS Lambda functions using Python.
- Connected the functions to API Gateway endpoints.
- Enabled logging and monitored logs using CloudWatch.
- Configured and tested canary deployments to route traffic between versions.
- Enabled CORS with custom OPTIONS responses.
- Secured endpoints using a custom Lambda Authorizer integrated with JWT authentication.
- Tested everything using Postman and curl.
Challenges we ran into
- Managing canary deployment settings correctly without breaking production traffic.
- Integrating JWT securely via Lambda Authorizer, especially around permissions and token structure.
- Ensuring proper function deployment timing before testing to avoid outdated versions.
Accomplishments that we're proud of
- Successfully implemented a full lifecycle of a serverless API: from initial deployment to monitoring, versioning, and securing endpoints.
- Learned to manage complex API Gateway configurations like canaries and authorizers.
- Understood the internals of secure token-based authentication using JWT in a practical AWS context.
What we learned
- How to use Lambda and API Gateway effectively for scalable and maintainable serverless APIs.
- How to manage canary deployments in AWS and promote versions safely.
- Hands-on experience with JWT, token signing, and Lambda Authorizers.
- How to observe API activity and debug effectively using CloudWatch.
What's next for ShonenChain We plan to:
- Add DynamoDB integration to persist API data.
- Implement more advanced security (rate-limiting, API keys).
- Create a front-end interface to interact with the API.
- Package the project as a reusable template for other developers learning serverless architecture.
Built With
- api-gateway
- aws-lambda
- postman-api
- python
- visual-studio-code
- windows-command-line-interface-with-wsl-installed
Log in or sign up for Devpost to join the conversation.