Have you ever thought you understood the timeline of a request in AWS Lambda only to stare at your logs and traces and find out that you didn't? The official documentation has diagrams that look pretty, but don't convey everything that is important. In this post I'll present the infographic I use to understand what Lambda is doing and what is and isn't in the logs.
But the truth is, we aren’t holding it wrong and coldstarts aren’t all your fault. In this post, I fail to stay frosty. In fact I get spicy, and make the case that we shouldn’t lay off the pepper until we stopped getting blamed for AWS’s coldstart problem.
Are you ready to make your AWS accounts go BRRR? Announcing the Speedrun done before the bass drops competition. A fun competition where you'll be using Speedrun blocks to complete the most insane thing you can before the bass drops at 90 seconds and everyone loses their minds. I'm accepting submissions any time between now and 01/15/2024 11:59:59 PM PST.
When I was oncall in a previous life, I found myself repeatedly needing to run AWS CloudWatch Logs Insights queries across multiple accounts and regions. I banged together a script one afternoon and kept finding new uses cases for it. In this post, I've recreated it and brought it to life with Speedrun.
I'm a big fan of the CloudWatch Embedded Metrics Format. It lets you write metrics to the lambda log without the overhead of a service call. Alas, there is no Embedded EventBridge Format, you need to make a sync call to EventBridge to put events onto the bus. Can we make it more asynchronous? In this post, I'll describe a back door to publishing events to EventBridge by just writing JSON to the lambda log.
You thought you could just set some flags and your node.js lambda function would be bundled, tree-shaken, minified and go from ice cold to glowing hot in milliseconds? My sweet summer child. I thought that too, but then I analyzed the bundle, pored over some traces and realized how wrong I was. What follows is the rabbit hole I went down to optimize my lambda coldstarts.
How to log
Hello World is taught, but how to log something useful isn't. Too often, developers add logging until their code works, then they forget about it. In this post I'll teach you how to instrument your code with request logs so when you have millions of users and production is going sideways, you know exactly what is going on.