A step-by-step guide on integrating the MediatR library with .NET AWS Lambda functions triggered via Function URLs. Shows how to set up dependency injection, route HTTP methods (GET, PUT, POST, DELETE) to appropriate MediatR handlers, and deploy the function. Also touches on using this pattern to consolidate related business logic into a single Lambda function to reduce cold start frequency.

4m read timeFrom nodogmablog.bryanhogan.net
Post cover image
Table of contents
1. Create a Lambda project, with a Function URL2. Add NugGet packages3. Update Program.cs4. Create the MediatR requests and handlers5. Update the deployed function6. Test the functionA quick note on cold starts
1 Impression