With this release we’ve officially graduated from RC to a full production-ready version.
📝Full Release Notes: github.com/localstack-d...
cc: @davidfowl.com
With this release we’ve officially graduated from RC to a full production-ready version.
📝Full Release Notes: github.com/localstack-d...
cc: @davidfowl.com
📢LocalStack .NET Aspire Integration just hit its first stable release! 🎉
Highlights:
⚡ Eager service loading support (KUDOS @stu.dev)
🐳 Docker socket support (for Lambda containers)
🐛 Fixed Lambda + SQS "Invalid URL" bug
github.com/localstack-d...
The Go team shared similar feedback 💪
Originally, the plan was to keep separate monorepos for .NET and Go because of the tooling complexity.
Looks like we might actually move to a single backend repo 💯
We’re even joking about just migrating into existing frontend mono repo😀
And oh. my. god.
The NX team nailed the hard stuff, affected, caching, all the things that usually make you cry in monorepo 😅
In just a few hours, I moved my .NET playground repo over, tweaked the CI/CD pipeline, and it just worked.
It felt like black magic 🚀
Lately, our backend chapter’s been deep in the monorepo rabbit hole 🕳️
The frontend folks in the company have been using NX for years, so we figured, even though we weren’t exactly fans, let’s give it a shot.
Turns out, NX actually has plugins for both .NET and Go 🤯
We’ve got two backend stacks at the company: .NET and Go 🧑💻
Both are actively used — the balance shifts from squad to squad ⚖️
I believe there aren't many production-ready, end-to-end examples of Native AOT Lambdas deployed via AWS .NET CDK with this kind of local setup. I hope BadgeSmith becomes a useful case study for the community 🙌
I was able to share the same CDK stack between the production deployment and the local Aspire setup, ensuring local development is as close to production as possible👇
github.com/localstack-d...
This project also became a production ready, fully serverless example of modern .NET development, combining:
🏎️ .NET 9 Native AOT Lambda Functions
✨ .NET Aspire Host orchestration
☁️ AWS Aspire Integrations
🧑💻 LocalStack for local development
cc: @davidfowl.com
Let's talk performance⚡
While I managed to get the cold start under 100ms, things naturally change when network calls (Nuget and Github Api, DynamoDb etc.) come into play.
Still, in stress tests running at 1,000 RPM, I observed a max memory consumption of only 60MB💪
While I initially developed the project for my own needs, I built it from the ground up to be a white-label solution⚪
The deployment pipeline is reusable, and the entire CDK Stack can be deployed to any AWS Account, making it super flexible for anyone to host.
BadgeSmith is finally live! 🚀
It’s been a very educational journey for me. But, what BadgeSmith actually does🤔
It's a general-purpose, high-perf badge service with Shields .io-compatible endpoints for NuGet and GitHub packages, and CI/CD test results
github.com/localstack-d...
These are baseline numbers. I still need to add HttpClient and the AWS SDKs, so I expect these figures to climb. 📈
Still, it's a strong starting point. While I'm building this for a specific need, it will be also a production-ready .NET Aspire sample🎯
🎛️ Finally, fine-tune your compilation with AOT flags.
• InvariantGlobalization=true: Shrinks package size and cuts init time if you don't need culture-specific behavior.
• TrimMode=full: Enables aggressive trimming. Start with partial first to ensure stability.
🔥And prefer .NET 9 over .NET 8! The improvements for Native AOT are dramatic. I saw:
📦 ~10-15% smaller function size
⏱️ ~15 ms faster init times
🚀 Higher overall performance
I honestly can’t imagine what .NET 10 will bring
🐧Your environment choices have a huge impact.
• Runtime: Use AWS’s provided.al2023. I measured a ~15 ms faster init vs. the official dotnet8 runtime.
• Architecture: arm64 beats amd64. Expect a 10-15% smaller package, lower memory usage, and ~10 ms faster bootstrap.
📡My trick for OpenTelemetry: wrap it in preprocessor directives(# if ENABLE_TELEMETRY)
A compile-time flag can strip the entire dependency, cutting package size and saving ~30ms on init + ~15ms per call. I only enable it when I need to debug. Instantiate the SDK directly, NO DI
⚖️You have to make choices for performance
Microsoft.Extensions.Logging adds a ~20 ms cold start overhead. I kept it for its structured logging features, but for absolute maximum performance, fall back to the basic LambdaContext.Logger.
🚨This is the most critical one for Lambda: Avoid Generic Host, Dependency Injection (ServiceCollection), and ConfigurationBuilder.
Technically they work, but the overhead is huge:
• Generic Host alone: Adds ~70-80 ms
• DIY ServiceCollection/ConfigBuilder: Still adds ~30 ms
First, the fundamentals of AOT:
🔮NO Reflection, NO dynamic code. The compiler will warn you anyway.
🛠️ALWAYS use Source Generation. For JSON, regex, etc. Even outside of AOT, this is the way. It boosts performance and can cut memory allocations💡
Been so deep in .NET NativeAOT experiments, the business logic is still evolving! 🧪 But the project's technical skeleton is solid. 🏗️
I started at 250ms Init / 50MB memory, now down to just 77ms / 28MB. The package is 3.5MB zipped. 📉
Here are my insights and key takeaways 👇
I’ve cleaned up the project and made it public
TL;DR
🚀 Cold start init: 77ms, memory allocation: 28MB
📦 Package size: 3.5MB
🔥 .NET 9 AOT > .NET 8 (smaller, faster)
❌ Dropped DI/Host/Reflection
🛠️ Using source generators
🐧 Use arm64+provided.al2023
github.com/localstack-d...
⏳ Waiting a few weeks for RC feedback before the full release with more features. Huge thanks to the AWS .NET Team @normj.bsky.social & @davidfowl.com for the support! 🙌
🌴 On vacation for 2 weeks, so won’t be around much. Feedback here 👇
🔗 github.com/localstack-d...
➕ Additionally, I've started migrating my long-maintained LocalStack Serverless demo to Aspire in a separate branch (still in progress🚛). The README isn't updated yet, but the example works👇
🔗 github.com/localstack-d...
🎯 I've also updated my Aspire + OTEL + LocalStack demo from last year’s Devnot to use the new LocalStack package! 🚀
A great example of Aspire and LocalStack in action.
🔗 github.com/Blind-Strike...
🛠️ The repo includes two complete examples in the playground folder:
📦 AWS provisioning with full messaging flow + real-time UI ➡️DynamoDB, SNS, SQS
🔗 URL shortener built with 2 Lambda functions ➡️ DynamoDB, S3
You can quickly get started👇
🔗 github.com/localstack-d...
📢 Finally finished work on LocalStack - .NET Aspire Integration!
🚀RC now on NuGet.
1️⃣Extends official AWS Aspire integrations with LocalStack features
2️⃣Auto-detects AWS resources
3️⃣Auto-configures LocalStack endpoints
🔗 github.com/localstack-d...
cc: @davidfowl.com @localstack.cloud
🎁Bonus content!
🤔 I ran into a problem: how to show separate v1 & v2 badges for my NuGet packages? The defaults didn't work.
💡So I built a small AWS Lambda to do it
✨It’s not a general-purpose tool, but a fun example of solving your own problems!
github.com/localstack-d...
👨💻And since I was already deep in the code, I updated the localstack-serverless-dotnet-demo project.
🎓 It was lagging behind, but now it's a fresh, relevant example for anyone wanting to develop AWS apps locally with @localstack.cloud
github.com/localstack-d...
📢A quick reminder on the two-track strategy:
v1.x (for AWS SDK v3) is still in active maintenance🚀 In fact, I've just released a patch for it to support new endpoints in @localstack.cloud
sdkv3-lts branch👇
github.com/localstack-d...