Fully test your AWS .NET 6 Lambdas on localstack

A new Implementation everyday

Anthony Trad
6 min readMar 18, 2023
Lambda meme

Introduction

With .NET and C#, you always have something new coming up. We now have a routine of adjusting, migrating, and learning to do things a better way. AWS is also among the best cloud providers with very good integration with .NET…

Imaging coupling the above with localstack, one of the most active repositories that release a new version every month or so. We can easily get messy while combining those 3.

Here’s a small article that will give you a head start on how to use localstackto run your newly polished .NET 6 lambda!

What’s an AWS Lambda

An AWS Lambda is just a function that is packaged and run independently. You give your function to AWS, and when you call it, AWS runs it somewhere, executes the code, and shuts it off.

How AWS does that for you?

This is a rather complex subject, but we can simplify and omit some pieces to include only things we will use.

Runtime

Just like any machine, a Lambda needs a runtime to execute. Those are the same things we install on our machine or docker image, if you remember.

--

--

Anthony Trad

Senior Software Engineer focused on .NET and the Cloud. Reconsidering major principles and patterns, ideas are my own.