Blog
- Making your life less miserable when mocking AWS SDK with Node
You're writing your tests, your AI agent is crushing it, all use cases and edge ones are being covered, but you've installed an AWS SDK and now you'll need to mock it (oh boy). After a few hours in, and a few years of life out the window, you notice that nothing you do can actually mock the cretin and you begin to lose hope, but after doing some research you soon notice that you'll need another dependency just for that: aws-sdk-client-mock. It surely gives you a convenient way to mock the clients, but it also makes them require special treatment, since it enforces a specific way of mocking. The good thing is, it does not need to be like this.
- Simplify managing complex scripts for your projects
Every project starts pure and innocent: one command to run it and another to test it. Then comes linting, formatting, migrations, Docker building, the seeding script and, before you notice, your README has become an amalgamation of workarounds, incantations and rituals everybody has to go through just to start the project. However, there's a tool that has been sitting on most machines for decades which helps to clean the mess and relieve you from the eternal torment of having to prompt Claude every time you need to run your project.
- Keeping DNS zones organized with zone delegation
DNS is one of those things that works so well in the background that nobody thinks about it until someone accidentally deletes an A record five minutes before a demo. As infrastructure grows and more environments show up, dumping every record for every environment into one giant hosted zone starts to feel a lot like that moment, just waiting to happen. Zone delegation is the fix, and it's simpler to set up than most people expect.
- Creating a Lambda deployment script
You've got a Lambda running in production and a shiny new image sitting in ECR. The lazy move is to update the image URI, walk away, and hope for the best. The problem is that this swaps the code for everyone, instantly, with no safety net. If the new version is broken, congratulations, it's broken for 100% of your traffic before you even finish your coffee. What you might be looking for is to publish an immutable version, then shift traffic onto it in a controlled way, all from a single script and preferably in an automated manner.
- Managing document metadata in React 19
This post's title may seem odd to you, if you're up to date, but a few things have changed from React 18 to 19, and one of them is how you manage document metadata. Before it, you likely had some shenanigans going on, like react-helmet or react-helmet-async in place to dynamically update your document title, inject custom metadata, links, scripts or even styles. Thankfully, with React 19 you'll very likely be able to drop all of that in favor of simplicity and good old HTML.
Powered by Simple Blog API