Home

Progress Update 06/01/2023

06/01/2023

Progress so far: I have two lambda functions: FileUploadHandler, which responds to S3 PUT/PUSH events, and MarkdownProcessorHandler, which responds to an SQS event queue. When an ".md" file is uploaded to the S3 source bucket, it splits the file into the front-matter (metadata) and the markdown body, and sends a message with the details to the SQS queue. The second lambda responds to the SQS event, converting the markdown body to HTML, and writes the HTML to the destination bucket.

I've created a new module called SharedModels, which contains data models which should be common to the lambda functions. It also contains some useful extension functions.

I have managed to do set up some local lambda execution via AWS SAM and Docker, though it is very limited because both lambdas need to be able to read or write to S3 buckets and the SQS queue, neither of which run locally.

I had a bit of a diversion trying to improve logging; no luck.

Finally, I've decided to split this development diary into separate markdown files, as it will be a better real-world test once Cantilever starts to become useful.

Going a little mad

I've found myself playing with context receivers, an experimental Kotlin construct which isn't part of the core language. It's letting me pass the aws lambda logger into an extension function which wouldn't normally be expected to know about lambda loggers.

Prev: Flexmark for Markdown processing Next: DynamoDB Migration Complete