This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a .NET library that provides extensions and middleware for Amazon.Lambda.AspNetCoreServer.Hosting, designed specifically for AWS Lambda hosting environments. It delivers improved reliability, observability, and developer experience for ASP.NET Core applications running on AWS Lambda.
- src/LayeredCraft.Lambda.AspNetCore.HostingExtensions/ - Main library project containing middleware and extensions
- Middleware/LambdaTimeoutLinkMiddleware.cs - Core middleware that links Lambda timeout with HTTP request cancellation
The main component is LambdaTimeoutLinkMiddleware which provides timeout handling by:
- Creating a cancellation token that triggers on either client disconnect or Lambda timeout
- Replacing
HttpContext.RequestAbortedwith a linked token during request processing - Setting appropriate status codes (504 for timeout, 499 for client disconnect)
- Operating as pass-through in local development where
ILambdaContextis unavailable
dotnet builddotnet testdotnet restoreThe project targets both .NET 8.0 and .NET 9.0 (net8.0;net9.0).
- Amazon.Lambda.AspNetCoreServer (v9.2.0) - AWS Lambda ASP.NET Core hosting
- LayeredCraft.StructuredLogging (v1.1.1.8) - Structured logging utilities
This is a packable library (NuGet package) with:
- MIT license
- SourceLink support for debugging
- Symbol packages (.snupkg) for enhanced debugging experience
- Version prefix: 2.0.1