This morning I launched barz.lol. A small but fun project I had been working on for the past couple of weeks. It’s a fully serverless REST API hosted on AWS that returns the stupidest rap lyrics of all time. I had two sources of inspiration for this: JSON Placeholder and the Kanye API.
I wanted to create a rest API for front-end prototyping that was also fun.
The other reason I developed this was to learn more about AWS’ SAM offering. It stands for Serverless Application Model and I first learned about it during my studies for the AWS Developer Associate exam (which I passed BTW before getting sick).
It’s a very powerful framework for bootstrapping serverless application projects.
I opted to use Go as the programming language though I could’ve gone with python or node. The point was really to solidify my knowledge of AWS services and how they work together not so much the logic itself which is pretty boring.
The backend uses API Gateway, Lambda and DynamoDB for the database layer. The “front-end” (ie the landing page) is built with astro.js and deployed to an S3 Bucket served by a CloudFront distribtion.
All of the infrastructure was bootstrapped and provisioned using CloudFormation. I honestly had a tonne of fun learning about the different services and resources. I used to be a convinced terraform shill but I see the benefit of using CloudFormation when working within the AWS ecosystem.
What I like most about SAM is the new
sam pipeline command that generates a fully working (not-really) CI/CD pipeline
manifest for most vendors out there (including Gitlab CI).