McDoit.Aws.Lambda.Executors 0.1.1

dotnet add package McDoit.Aws.Lambda.Executors --version 0.1.1
                    
NuGet\Install-Package McDoit.Aws.Lambda.Executors -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="McDoit.Aws.Lambda.Executors" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="McDoit.Aws.Lambda.Executors" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="McDoit.Aws.Lambda.Executors" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add McDoit.Aws.Lambda.Executors --version 0.1.1
                    
#r "nuget: McDoit.Aws.Lambda.Executors, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package McDoit.Aws.Lambda.Executors@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=McDoit.Aws.Lambda.Executors&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=McDoit.Aws.Lambda.Executors&version=0.1.1
                    
Install as a Cake Tool

McDoit AWS Lambda Executors

Utilities for building AWS Lambda handlers with Microsoft.Extensions.Hosting, including base executors plus SNS and SQS integrations.

Terminology

  • Handler: Lambda runtime entrypoint.
  • Executor: invocation/event-envelope orchestration.
  • Processor: record-level SNS/SQS processing implementation.

Packages

Package Purpose
McDoit.Aws.Lambda.Executors Core hosting, registration, and execution abstractions for Lambda workloads.
McDoit.Aws.Lambda.Executors.Sns SNS-specific registration and executor helpers.
McDoit.Aws.Lambda.Executors.Sqs SQS-specific registration and executor helpers.

NuGet

Primary package ID:

  • McDoit.Aws.Lambda.Executors

Install:

dotnet add package McDoit.Aws.Lambda.Executors

If you need SNS/SQS integrations, install:

dotnet add package McDoit.Aws.Lambda.Executors.Sns
dotnet add package McDoit.Aws.Lambda.Executors.Sqs

Usage

All examples use Host.CreateApplicationBuilder(args) and register one Lambda mode per service collection.

Core event lambda

using Amazon.Lambda.Core;
using McDoit.Aws.Lambda.Executors;
using McDoit.Aws.Lambda.Executors.Extensions;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);
builder.AddEventLambda<OrderCreatedEvent, OrderCreatedEventExecutor>();

public sealed class OrderCreatedEventExecutor : IEventExecutor<OrderCreatedEvent>
{
    public Task ExecuteAsync(OrderCreatedEvent? input, ILambdaContext context, CancellationToken cancellationToken)
        => Task.CompletedTask;
}

public sealed record OrderCreatedEvent(string OrderId);

Core request/response lambda

using Amazon.Lambda.Core;
using McDoit.Aws.Lambda.Executors;
using McDoit.Aws.Lambda.Executors.Extensions;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);
builder.AddRequestResponseLambda<PingRequest, PingResponse, PingExecutor>();

public sealed class PingExecutor : IRequestResponseExecutor<PingRequest, PingResponse>
{
    public Task<PingResponse> ExecuteAsync(PingRequest? input, ILambdaContext context, CancellationToken cancellationToken)
        => Task.FromResult(new PingResponse($"Pong: {input?.Message ?? "empty"}"));
}

public sealed record PingRequest(string Message);
public sealed record PingResponse(string Message);

SNS typed processor

using Amazon.Lambda.Core;
using Amazon.Lambda.SNSEvents;
using McDoit.Aws.Lambda.Executors.Sns;
using McDoit.Aws.Lambda.Executors.Sns.Extensions;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);
builder.AddSnsLambda<OrderShippedNotification, OrderShippedNotificationProcessor>();

public sealed class OrderShippedNotificationProcessor : ISnsNotificationProcessor<OrderShippedNotification>
{
    public Task ProcessAsync(OrderShippedNotification? notification, SNSEvent.SNSRecord record, ILambdaContext context, CancellationToken cancellationToken)
        => Task.CompletedTask;
}

public sealed record OrderShippedNotification(string OrderId);

SQS typed processor

using Amazon.Lambda.Core;
using Amazon.Lambda.SQSEvents;
using McDoit.Aws.Lambda.Executors.Sqs;
using McDoit.Aws.Lambda.Executors.Sqs.Extensions;
using Microsoft.Extensions.Hosting;

var builder = Host.CreateApplicationBuilder(args);
builder.AddSqsLambda<OrderCreatedMessage, OrderCreatedMessageProcessor>();

public sealed class OrderCreatedMessageProcessor : ISqsMessageProcessor<OrderCreatedMessage>
{
    public Task ProcessAsync(OrderCreatedMessage message, SQSEvent.SQSMessage rawMessage, ILambdaContext context, CancellationToken cancellationToken)
        => Task.CompletedTask;
}

public sealed record OrderCreatedMessage(string OrderId);

Local development

dotnet build .\McDoit.Aws.Lambda.Executors.slnx
dotnet test .\McDoit.Aws.Lambda.Executors.slnx
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on McDoit.Aws.Lambda.Executors:

Package Downloads
McDoit.Aws.Lambda.Executors.Sns

SNS-specific AWS Lambda executors and registration helpers for typed and raw-aware notification handling.

McDoit.Aws.Lambda.Executors.Sqs

SQS-specific AWS Lambda executors and registration helpers for typed and raw-aware message handling.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 4,328 5/4/2026
0.1.0 146 5/4/2026