Skip to main content

11 posts tagged with "AWS Lambda"

AWS Lambda - Run code without thinking about servers or clusters

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.

Why your CDK deploys might be slow - tags propagate to children

· 8 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

I noticed quite some time ago that my CDK deployments had gotten slow, and that a lot of the churn was SQS. I did not really have time to dig into it, and I half-convinced myself it was just a feeling - that it had not actually slowed down. Eventually it nagged at me enough that I sat down with an LLM agent to investigate. The culprit turned out to be a one-liner buried in a construct I use everywhere.

Lambda Bun runtime rewrite

· 8 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

When I created @beesolve/lambda-bun-runtime I mostly did it because it seems that the Lambda is very low on the Bun priority list and I wanted to have something which is up to date where I can fix the bugs quickly. I also wanted to provide better DX and tooling built around the CDK.

After using it for a while I realized that the approach of the official Bun's custom layer for Lambda does not align with my mindset.

Publishing CDK construct to Constructs Hub

· 17 min read
Ivan Barlog
AWS Solutions Architect @ BeeSolve

Two weeks ago I've published Lambda Bun Runtime and Lambda Keep Active CDK constructs which you can download and install from npm. I've also written about those in their respective articles.

Since there is strong community build around Constructs Hub I wanted my constructs to be available there as well. Unfortunatelly for me you need to use projen in order to be picked up by Construct Hub. So I have converted my repositories to projen repositories. This article is about my thorny path.