![]() |
VOOZH | about |
dotnet add package Siemens.AspNet.Lambda.Sdk.Contracts --version 7.5.8
NuGet\Install-Package Siemens.AspNet.Lambda.Sdk.Contracts -Version 7.5.8
<PackageReference Include="Siemens.AspNet.Lambda.Sdk.Contracts" Version="7.5.8" />
<PackageVersion Include="Siemens.AspNet.Lambda.Sdk.Contracts" Version="7.5.8" />Directory.Packages.props
<PackageReference Include="Siemens.AspNet.Lambda.Sdk.Contracts" />Project file
paket add Siemens.AspNet.Lambda.Sdk.Contracts --version 7.5.8
#r "nuget: Siemens.AspNet.Lambda.Sdk.Contracts, 7.5.8"
#:package Siemens.AspNet.Lambda.Sdk.Contracts@7.5.8
#addin nuget:?package=Siemens.AspNet.Lambda.Sdk.Contracts&version=7.5.8Install as a Cake Addin
#tool nuget:?package=Siemens.AspNet.Lambda.Sdk.Contracts&version=7.5.8Install as a Cake Tool
The Siemens.AspNet.Lambda.Sdk.Contracts NuGet package provides core abstractions—interfaces, delegates, and base
classes—essential for implementing AWS Lambda functions using the Siemens Lambda SDK. This contract library enables
consistent, maintainable, and testable Lambda implementations.
This package defines interfaces and delegates crucial for middleware-based pipeline handling and function execution in AWS Lambda environments.
📐 Lambda Function Handlers
IFunctionHandler<TRequest>IFunctionHandler<TRequest, TResponse>🔗 Middleware Interfaces
ILambdaMiddleware<TRequest>ILambdaMiddleware<TRequest, TResponse>🚦 Pipeline Executors
ILambdaPipelineExecutor<TRequest>ILambdaPipelineExecutor<TRequest, TResponse>🔀 Delegates for Request Handling
LambdaRequestDelegate<TRequest>LambdaRequestDelegate<TRequest, TResponse>📌 Structured Error Logging
SpecificErrorLogHandlerdotnet add package Siemens.AspNet.Lambda.Sdk.Contracts
public class MyFunction : FunctionBase<SQSEvent>
{
public override Task HandleAsync(SQSEvent request, ILambdaContext context)
{
// Your Lambda handling logic here
}
}
public class Function : FunctionBase<CognitoPostConfirmationEvent, CognitoPostConfirmationEvent>
{
public override Task<CognitoPostConfirmationEvent> HandleAsync(CognitoPostConfirmationEvent request,
ILambdaContext context)
{
// Your Lambda handling logic here
}
}
Function:
public class Function : FunctionHandlerBase<Startup, CognitoPostConfirmationEvent, CognitoPostConfirmationEvent>
{
}
Startup:
public sealed class Startup : LambdaStartup
{
protected override void ConfigureServices(IServiceCollection services,
IConfiguration configuration)
{
base.ConfigureServices(services, configuration);
services.AddFunctionHandler();
}
}
FunctionHandler:
internal static class AddFunctionHandlerExtension
{
internal static void AddFunctionHandler(this IServiceCollection services)
{
services.AddSingletonIfNotExists<IFunctionHandler<CognitoPostConfirmationEvent, CognitoPostConfirmationEvent>, FunctionHandler>();
}
}
internal sealed class FunctionHandler(IMyService service,
IJsonSerializer jsonSerializer) : IFunctionHandler<CognitoPostConfirmationEvent, CognitoPostConfirmationEvent>
{
public Task<CognitoPostConfirmationEvent> HandleAsync(CognitoPostConfirmationEvent request,
ILambdaContext context)
{
// Your custom logic here
}
}
Leverage middleware for clean and maintainable request handling. Sample middleware for error logging: (This middleware is already included in the SDK and active !)
internal static class AddErrorLogRequestMiddlewareExtension
{
internal static void AddErrorLogRequestMiddleware(this IServiceCollection services)
{
services.AddErrorLoggingStrategyForLambda();
services.AddSingleton(typeof(ILambdaMiddleware<>), typeof(ErrorLogRequestMiddleware<>));
}
}
internal sealed class ErrorLogRequestMiddleware<TRequest>(IErrorLoggingStrategyForLambda errorLoggingStrategy) : ILambdaMiddleware<TRequest>
{
public async Task InvokeAsync(TRequest request,
ILambdaContext context,
LambdaRequestDelegate<TRequest> requestDelegate)
{
try
{
await requestDelegate(request, context).ConfigureAwait(false);
}
catch (Exception e)
{
await errorLoggingStrategy.HandleAsync(context, e).ConfigureAwait(false);
throw;
}
}
}
Detailed documentation and examples are included in the source repository and will be published online soon.
Contributions and feedback are highly appreciated! Feel free to create issues or submit pull requests.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Siemens.AspNet.Lambda.Sdk.Contracts:
| Package | Downloads |
|---|---|
|
Siemens.AspNet.Lambda.Sdk
The Siemens.AspNet.Lambda.Sdk NuGet package simplifies and accelerates the development of AWS Lambda functions using ASP.NET-inspired middleware pipelines, structured exception handling, and pre-configured startup patterns. |
|
|
Siemens.AspNet.Lambda.MsTest.Sdk
Provides testing utilities and extensions for AWS Lambda functions, including structured test handlers, mock support, and coverage helpers. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.5.8 | 0 | 6/19/2026 |
| 7.5.7 | 0 | 6/19/2026 |
| 7.5.6 | 43 | 6/17/2026 |
| 7.5.5 | 27 | 6/17/2026 |
| 7.5.4 | 27 | 6/17/2026 |
| 7.5.3 | 128 | 6/17/2026 |
| 7.5.2 | 50 | 6/16/2026 |
| 7.5.1 | 1,066 | 6/2/2026 |
| 7.5.0 | 148 | 5/12/2026 |
| 7.5.0-alpha.16 | 61 | 5/18/2026 |
| 7.5.0-alpha.15 | 56 | 5/18/2026 |
| 7.5.0-alpha.12 | 61 | 5/12/2026 |
| 7.5.0-alpha.11 | 58 | 5/12/2026 |
| 7.5.0-alpha.10 | 57 | 5/12/2026 |
| 7.4.6 | 36 | 6/2/2026 |
| 7.4.5 | 557 | 5/24/2026 |
| 7.4.4 | 41 | 5/18/2026 |
| 7.4.3 | 40 | 5/18/2026 |
| 7.4.2 | 1,866 | 5/11/2026 |
| 7.4.1 | 39 | 5/11/2026 |