The World's Smallest Lambda Function
A 6KB binary serving verified computation at sub-millisecond latency
I deployed a Lambda function yesterday. The zip file was 6KB. The cold start was 4.5 milliseconds. Warm invocations run in under a millisecond. AWS bills me the minimum: 1ms per request.
The function serves a complete website — 7 HTML pages with routing, content-type handling, and favicon support — plus API endpoints that compute GCD, primality testing, and factorial using verified machine code.
Every computation in the binary was synthesized from a natural language description, validated against test cases, and compiled to LLVM IR. The binary contains zero unverified computation. The only C code is 9 syscall wrappers that talk to the kernel.
The Numbers
For context:
The cold start is 3.4ms for init + 1.1ms for the first invocation. After that, every request completes in under a millisecond. AWS rounds up to 1ms — the minimum billable unit. You cannot pay less for compute on Lambda.
How It Works
The binary is a custom Lambda runtime — it implements the Lambda Runtime API directly:
Every step except the HTTP I/O is a verified function — synthesized from intent, tested against cases, compiled to native machine code. The route dispatch uses a verified hash function. The JSON parsing uses a verified key extractor. The string operations are all verified.
What's In The Binary
The binary is 17KB stripped, statically linked, no libc. It contains:
The entire attack surface is:
Recommended by LinkedIn
The Cost Story
At $2.10 per million requests for verified computation vs $100+ per million for an equivalent Node.js Lambda with unverified dependencies — the Semcom binary is cheaper AND proven correct.
For a typical enterprise API handling 10 million requests/month:
Why This Matters
The software industry has accepted two things as normal:
Both of these are choices, not constraints. A Lambda function that computes GCD doesn't need Node.js. It doesn't need npm. It doesn't need 50MB of code to add two numbers and check a remainder.
What it needs is:
Everything else is weight. We removed the weight. What's left is 6KB and it's verified.
Try It
The Lambda is live:
curl https://bl2jmkxkns6pweupcmqjcbu54u0bxgje.lambda-url.us-east-1.on.aws/api/gcd/48/18
→ 6
curl https://bl2jmkxkns6pweupcmqjcbu54u0bxgje.lambda-url.us-east-1.on.aws/api/prime/97
→ 1
curl https://bl2jmkxkns6pweupcmqjcbu54u0bxgje.lambda-url.us-east-1.on.aws/api/factorial/10
→ 3628800
Each response is a verified computation. Each capability was synthesized from intent, validated against test cases, and compiled to native machine code. The binary that runs it is 6KB.
The Semantic Compiler is patent pending. If you're building systems where correctness matters — defense, medical devices, financial services, critical infrastructure — I'd like to talk.
Lane Thompson CEO, Apilify Inc. LinkedIn · lane@apilify.com
That is beyond impressive
That's impressive! A full website in just 6KB is a serious feat. But what about scalability? When traffic spikes, how does that tiny Lambda handle the load? It's a delicate balance between size and performance, right?