๐ก๏ธ Game of Thrones Serverless API โ Project Story
๐ฅ Inspiration
This project was inspired by a series of YouTube videos from experienced cloud developers who discussed the best ways to get started in the cloud and which hands-on projects were most effective for learning. I wanted to build something fun yet technically richโso I combined my interest in Game of Thrones lore with a goal to deepen my cloud engineering skills.
๐ What I Learned
Throughout this project, I learned:
- Infrastructure as Code (IaC): How to define and manage AWS resources using AWS SAM instead of relying on the web console. This approach made the process faster, repeatable, and more maintainable.
- Serverless Architecture: Understanding how AWS Lambda, API Gateway, and DynamoDB can be combined to build a scalable, event-driven backend.
- AWS SDK (Boto3): Gained practical experience calling AWS services programmatically from within Lambda functions.
- Testing Serverless APIs: Learned to write unit tests for Lambda route handlers, and the challenges involved in mocking AWS services.
- Containerization with Docker: My first hands-on experience with Docker, particularly for local testing of Lambda functions.
- NoSQL Data Modeling: Designed a DynamoDB schema for knight data, learning to think in access patterns instead of fixed schemas.
- Frontend Integration: Integrated a React + TypeScript frontend to make the API more accessible with a seamless UI.
๐ ๏ธ How I Built It
I developed this project incrementally, milestone by milestone:
- Set up AWS SAM to scaffold the project and declare AWS resources (Lambda, API Gateway, DynamoDB) using
template.yaml. - Created Lambda functions to serve data about knights in response to HTTP requests.
- Integrated DynamoDB to store and query knight information efficiently.
- Tested endpoints locally using Docker and the SAM CLI.
- Deployed using
sam deploy, managing resources via CloudFormation stacks. - Implemented unit tests to validate endpoint behavior.
- Built a React + TypeScript frontend to consume the API and display knight data in a user-friendly format.
โ๏ธ Challenges Faced
Like most real-world cloud projects, this one came with its share of challenges:
- Unit testing Lambda routes: Mocking AWS services reliably during tests took time and experimentation.
- Learning Docker: I had never worked with containers before, so understanding how Docker ties into local testing was a steep learning curve.
- DynamoDB data modeling: Designing an efficient schema in a NoSQL, schema-less environment required a shift in mindset from relational database thinking.
- Cold start latency: I encountered slower response times during initial API requests and had to research best practices to reduce Lambda cold start impact.
- IAM Permissions: Fine-tuning permissions for each Lambda function was tricky. I faced issues where functions failed silently due to missing access rights.
- Cross-Origin Resource Sharing (CORS): When connecting the frontend, I ran into CORS issues which I had to resolve through proper API Gateway configuration.
๐ฉ๏ธ Final Thoughts
This project helped me internalize how powerful and flexible serverless architecture can be. It was a hands-on experience that reinforced cloud fundamentals while teaching me how to build something scalable, cost-effective, and fun. I now feel much more confident working with AWS services in a professional, infrastructure-as-code-first workflow.
Built With
- amazon-dynamodb
- amazon-web-services
- api-gateway
- boto3
- docker
- iam
- lambda
- python
- react
- sam
- typescript
Log in or sign up for Devpost to join the conversation.