Cloud Resume Challenge — Phase 3: Backend Technologies & APIs
·1 min read
by Frank Doka
Article
Cloud Resume Challenge — Phase 3: Backend Technologies & APIs
Phase 3 adds a live visitor counter to the resume — a serverless backend that the JavaScript frontend calls on each page load.
What I Built
- DynamoDB table — Single-table design storing the visitor count. Created initially through the console, later rebuilt as IaC in Phase 5.
- Python Lambda function — Reads the current count from DynamoDB, increments it, writes it back, and returns the new value. Tested locally with AWS SAM before deploying.
- IAM permissions — Scoped the Lambda execution role to only the specific DynamoDB table and actions it needs (GetItem, UpdateItem). Least privilege from the start.
- API Gateway — REST API with a single route that triggers the Lambda function. Tested the endpoint with Postman to confirm correct JSON responses before wiring up the frontend.
Lessons Learned
- SAM for local development — Running Lambda and DynamoDB locally with
sam local invokecaught bugs before they hit AWS. - API Gateway testing — The built-in test console is useful for quick checks, but Postman gave me more control over headers and request bodies.
- Atomic counters — Used DynamoDB's
UpdateExpressionwithADDfor atomic increment, avoiding race conditions on concurrent requests.