Tutorial - Allowing CORS on AWS API Gateway using SAM - the easy way

As with every project, CORS does problems. This is a manual for future me on how to set it correctly. Option 1 - the hard way By the hard way, I mean specifying CORS manually in the openapi schema specs file. I started normally, as one does, by googling (actually I use DuckDuckGO, but this is a little offtopic). I entered “enabling CORS on API gateway openapi” and a bunch of results came out....

September 24, 2023

How to completely block your DynamoDB stream processing

How an simple mistake blocked my stream processing and had me debugging something that I was sure was working for the past week. Simple bug breaks down my whole article processing pipeline When I created my DynamoDB stream, I knew that I will be only adding articles, I was not considering removing records from the table at all. As such, I created a python lambda function, that always checks the NewImage field in the incomming records and processes it....

September 10, 2023

Configuring a DynamoDB stream

How I configured the DynamoDB stream that sends newly created articles to a lambda function for processing. Goal Whenever I insert a new article into my table, I want a lambda function to read the record and process it. Processing includes: extracting header, abstract and date noting last change from the stream event metadata compiling the markdown content to html Creating the table Creating a table in AWS SAM is really easy, it is just a few lines in the template....

September 5, 2023

Creating a serverless blog

I am creating a blog. Mainly to learn new stuff. During the build I will document the process on the blog itself. Technology and intentions The main purpose of building this blog is to deepen my skills in the AWS environment and also to have a place to document some of the stuff that i learn along the way. The high level goal is to build a fully serverless application using the AWS serverless application model - AWS SAM....

September 4, 2023