After 60 days of running BunOnLambda, we discovered that its 3x faster cold starts come with a hidden cost: broken NetSocket APIs. Here's what we learned and how we fixed it. Our serverless costs dropped by 25% but our headaches increased. Is the tradeoff worth it?
Introduction to BunOnLambda
BunOnLambda is a custom Lambda runtime that promises significant performance gains. To get started, you'll need to install the @bun/runtime package and set up your Lambda function to use the BunOnLambda runtime. Here's an example of how to do this:
import { Command } from ' @aws-sdk/client-s3 ' ;
const s3Client = new Command ({ // Your S3 config here });
// Use the S3 client to perform operations const data = await s3Client . send ( new ListBucketsCommand ({})); console .…