Skip to main content

15 posts tagged with "Serverless"

Serverless - fully managed, request based, on demand

View All Tags

Bun on Lambda: customer-managed runtime by default, 85 kB instead of 51 MB

· 10 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

In the last post I wrote that I am going to update @beesolve/lambda-bun-runtime to use customer-managed runtimes (CMR). It is done. BunFunction now runs on a Bun runtime that I publish for every release, and the npm package went from about 51 MB to about 85 kB unpacked, because the layer zip is no longer inside it.

This is a major version (v4) with breaking changes, so here is what changed, what stayed, and what your options are.

Bun on Lambda Customer-Managed Runtimes: setup and benchmark

· 14 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

AWS Lambda customer-managed runtimes (CMR) are generally available. I was part of the private beta and I used it to move my Bun runtime from a Lambda layer to a runtime Lambda actually knows about. Then I benchmarked it against the layer, a container image, SnapStart and the official nodejs24.x runtime.

The main reason to switch is updates, not speed: you publish a new runtime version, move an alias and your functions pick it up on the next cold start. The lower cold start is a bonus, and I measured that too.

How 170 MB cost me $350 in 813 million S3 requests

· 16 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

I had wanted to see the analytics for this blog for quite some time. Turning on CloudFront access logs from the very start was a conscious decision: I wanted analytics, but I did not want to reach for Google Analytics - too much CSP complexity, the privacy concerns, the cookie policy, all of it. Logging to my own S3 bucket sidesteps every one of those, and I knew I would one day build something around the data. In practice that "something" was me running an ad-hoc Athena query from time to time to see how many hits /blog/* got in a given month - which works, but is not exactly user friendly. I had already built two dashboards (one for DMARC reports and one for email delivery), so I figured a third would be no trouble.

Adding it meant backfilling about a year of CloudFront access logs. The whole dataset is around 170 MB. Backfilling it cost me roughly $350. Done right it would have cost about $3. The data was tiny, the mistake was tiny, and the bill was not - and the reason is a single architectural decision I did not think twice about.

One year of Group Expense with Ease: migrating an SPA to SSR with LLM agents

· 12 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

Last year when I left my job I wanted to see whether I could build something without the help of all the internal tools I'd been using for the last 5 years. I had a great chance to change anything I wanted within my own stack. That's when the Group Expense with Ease site was born. Today I am celebrating a year since its initial release which I have celebrated with what else than a rewrite.