Sign in

Hi there! I’m Marco. I write mostly about software development, sometimes about books I’ve read, and occasionally something else to keep things interesting.

How to use esbuild to transpile and bundle your TypeScript Lambda functions in a Serverless Framework project — all without using any plugins!

Boy building blocks of legos — a play on the esbuild bundler
Building Lego bundles. My cover photo genius know no bounds! Photo by Kelly Sikkema. Thank you, Kelly!

esbuild is a JavaScript bundler written in Go by Evan Wallace which has risen in popularity recently due to its extremely fast speed, simplicity of use and, well, all-around better-ness when compared to older generation transpilers and bundlers like aging Webpack or Babel.

In this article, I’ll share a way to use esbuild to transpile, minify, and bundle your TypeScript (or, vanilla JavaScript) AWS Lambda function handlers before deploying them with the Serverless Framework — without using any Serverless plugins. Because we’re not using any plugins, the setup should work for other deployment tooling like AWS SAM as well.


Understanding Alan Turing and his seminal 1936 paper “On Computable Numbers” as a self-taught software engineer.

Photo of a pile of random books.
Photo by Robert Anasch. Thank you, Robert!

I’m a self-taught software developer. What was a childhood hobby turned into my professional career. But, I never went to school for it. My bachelor degree is the incredibly useful (not.) Communications degree. I can communicate all the things!

I avoided math courses as best I could throughout high school and college. Consequently, and despite filling in the gaps with online courses, I’ve always felt inadequate when it comes to mathematics in computer science, and still find reading published papers rather challenging. …

How to create and access DynamoDB tables for local development in a Serverless Framework project — all without using any plugins!

It’s literally a table. You try to come up with a better cover photo! Photo by Hannah Busing. Thank you, Hannah!

In this article, I’ll demonstrate a way to use DynamoDB Local (via Docker) together with the Serverless Framework. We’ll create a bootstrapping script which will read our serverless.yml file to create DynamoDB tables locally for use in unit tests — all without using any additional plugins. Using CloudFormation syntax, we'll define a DynamoDB table, then also create those tables automatically locally. We'll tie it all together with a unit test for an example Lambda function to see how it all works locally.

The article is somewhat advanced and assumes familiarity with Docker, the Serverless Framework tooling and configuration (serverless.yml), AWS…

Deploying and connecting to an AWS Elasticsearch cluster from AWS Lambda using the Serverless Framework

Photo by Michael Walter. Thank you, Michael!

In this article, I’ll demonstrate one approach for deploying an Elasticsearch domain to AWS using the Serverless Framework tooling without using any plugins. Using CloudFormation syntax, we’ll create the Elasticsearch cluster and then show how to make authorized requests to it using AWS Signature 4 signed requests. The article assumes familiarity with the Serverless Framework tooling and configuration (serverless.yml) and Elasticsearch, plus awareness of CloudFormation. In other words, you're here because you're using Serverless, and want to add Elasticsearch to your backend. Example Lambda handler code will be in JavaScript, but the Serverless configuration will work for any supported runtime.

Why I failed and what I’d do differently next time

Photo by Sarah Kilian on Unsplash

At the start of this month (June 2021) I set out on a challenge: to publish thirty articles in thirty days. Now, at the end of the month, how did I do? Well… I failed. I only managed to write & publish about one article every other day. Including this one, I wrote thirteen articles. Just under half of my goal of thirty. Not great. In this article I’ll look at what went wrong, share some of the results I did achieve, and explore what I’d do differently next time.

What went wrong? The underlying difficulty I had was getting…

Three books on computing, hardware, and information everyone should read

It’s good to know a bit of history. The past influences us in the present and helps inform our future. Computers being a big part of the modern world, it’s healthy to have some background understanding of how we got all these fancy toys, and a bit how they work. The three books in this article explore the topic of computers and information and will leave you with a much better understanding of how the hardware in your phone works, and some of the key people in history who helped make it happen.

Exploring the similarities between the land of fondue and sushi island

Definitely Hyrule. Or maybe Wartau, Switzerland.

For seven years I lived in Tokyo, Japan. More often than not, when I revealed to a Japanese person that I originated from Switzerland, I’d be told something along the lines of, “Ahhh. Swissu! That’s the Japan of Europe.” To many Japanese, Switzerland reminds them of Japan.

Last year I moved back to Switzerland — my first time living here as an adult, and the “Switzerland is the Japan of Europe” thing has been rattling around in my head since. Although this is certainly somewhat of a generalization, in more ways than one there does seem to be some truth…

How I develop AWS Lambda functions locally using a test-first approach

Photo by Lars Kienle on Unsplash

In this article I share an approach I use regularly to develop AWS Lambda functions (and other serverless projects) locally. It assumes a basic familiarity with AWS Lambda or a similar “serverless” service. The article will first introduce the approach, and then walk through a short example making use of it.

I’ve frequently seen other developers use the “guess and check” approach to AWS Lambda function development: Write some code; deploy and wait a long time; invoke the function; check the result; repeat. This isn’t that surprising given how many guides to developing AWS Lambda functions have you repeatedly deploying…

A mechanical calculator based on the Leibniz Wheel

You are asked to multiply together 731 and 379. How do you do it? Maybe you ask Alexa, Siri, or Google. You might reach for your phone. Maybe you have an abandoned calculator laying around. Or, perhaps you momentarily think about pulling out paper and pencil, before laughing at the ridiculousness of the thought. But, what you probably don’t reach for is a pocket-sized canister containing a mechanical calculating machine. But not all that long ago, in the 1950s, you might have.

Produced between 1948 and 1972 by Contina AG, the Curta was such a pocket-sized mechanical calculating machine. Invented…

Eight out of thirty articles written

Photo by Markus Spiske on Unsplash

Two weeks ago I set out on a writing challenge: I would write thirty articles within the thirty days in June — a “30 days, 30 articles” writing challenge. I am now half way through my self-inflicted challenge. How am I doing? In this article I’ll evaluate my progress and share some observations thus far.

I had a few reasons why I wanted to do this challenge. I wanted:

  • to decrease my perfectionism. By being somewhat forced to write an article each day, I have to lower my standards and not fret over little imperfections. …

Marco Lüthy

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store