AWS.Messaging.Lambda
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package AWS.Messaging.Lambda --version 1.0.0
NuGet\Install-Package AWS.Messaging.Lambda -Version 1.0.0
<PackageReference Include="AWS.Messaging.Lambda" Version="1.0.0" />
<PackageVersion Include="AWS.Messaging.Lambda" Version="1.0.0" />
<PackageReference Include="AWS.Messaging.Lambda" />
paket add AWS.Messaging.Lambda --version 1.0.0
#r "nuget: AWS.Messaging.Lambda, 1.0.0"
#:package AWS.Messaging.Lambda@1.0.0
#addin nuget:?package=AWS.Messaging.Lambda&version=1.0.0
#tool nuget:?package=AWS.Messaging.Lambda&version=1.0.0
AWS Lambda plugin for AWS Message Processing Framework for .NET
This package is a plugin for the AWS Message Processing Framework for .NET that allows a .NET Lambda function to handle messages that were published by the framework.
In AWS Lambda, the service takes care of reading the messages from the SQS queue and invoking your Lambda functions with the message events. This plugin allows you to feed the incoming Lambda event to message processing framework so it can dispatch the messages to the IMessageHandler.
Example
To get started, add the AWS.Messaging.Lambda NuGet package to your project:
dotnet add package AWS.Messaging.Lambda
The example shown below uses the .NET Amazon Lambda Annotations framework, which makes it easy to set up .NET's dependency injection.
In the Startup class, add a call to AddAWSMessageBus to configure the AWS Message Processing Framework with the IMessageHandler for each message type you expect the Lambda function to process. To inject the required services for using Lambda with the framework, add a call to AddLambdaMessageProcessor.
Publishers can also be configured if you expect the Lambda function to publish messages.
[LambdaStartup]
public class Startup
{
public HostApplicationBuilder ConfigureHostBuilder()
{
var hostBuilder = new HostApplicationBuilder();
hostBuilder.Services.AddAWSMessageBus(builder =>
{
builder.AddMessageHandler<OrderHandler, OrderInfo>();
builder.AddLambdaMessageProcessor(options =>
{
options.MaxNumberOfConcurrentMessages = 4;
});
});
return hostBuilder;
}
}
In the Lambda function itself you need to inject the ILambdaMessaging service. This service provides the entry point for the Lambda function
to pass in the SQSEvent sent in by the Lambda service. If your Lambda function is configured for partial failure response use the
ProcessLambdaEventWithBatchResponseAsync and return the instance of SQSBatchResponse. If partial failure response is not enabled
use the ProcessLambdaEventAsync method.
public class Function
{
[LambdaFunction(Policies = "AWSLambdaSQSQueueExecutionRole")]
public async Task<SQSBatchResponse> FunctionHandler([FromServices] ILambdaMessaging messaging, SQSEvent evnt, ILambdaContext context)
{
return await messaging.ProcessLambdaEventWithBatchResponseAsync(evnt, context);
}
}
Options
When calling AddLambdaMessageProcessor the following options are available to configure the framework.
- MaxNumberOfConcurrentMessages: The max number of messages the Lambda function will process at the same time.
The default value is
10. - DeleteMessagesWhenCompleted: When not using partial response failure with Lambda if this is set to
truethen after each message has been successfully processed the framework will delete the message. The default value isfalsewhich means the Lambda service will delete all of the messages in the Lambda event if the function invocation was successful. If the function is configured for partial response failure this property is ignored.
Useful Links
- AWS Message Processing Framework for .NET Design Document
- Sample Applications - contains sample applications of a publisher service, long-running subscriber service, Lambda function handlers, and using Polly to override the framework's built-in backoff logic.
- Developer Guide
- API Reference
- Introducing the AWS Message Processing Framework for .NET (Preview) Blog Post - walks through creating simple applications to send and receive SQS messages.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
| Product | Versions 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 was computed. 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 was computed. 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. |
-
net8.0
- Amazon.Lambda.Core (>= 2.5.1)
- Amazon.Lambda.SQSEvents (>= 2.2.0)
- AWS.Messaging (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AWS.Messaging.Lambda:
| Package | Downloads |
|---|---|
|
S3mphony
S3mphony brings clarity and simplicity to Amazon S3 for .NET developers with a fully generic, read-through storage channel that works with any class. Upload and retrieve structured data without ceremony: automatic key normalization, smart defaults, prefix-scoped listing, and JSON helpers make S3 feel like a natural extension of your API or service layer. Its precision caching model only stores responses when there’s meaningful signal (non-null, non-empty), while supporting efficient batched retrieval so you never pull more from the bucket than you need. Thread-safe design and bounded concurrency patterns help keep your app responsive without wasting network or compute resources. The result is a library that feels effortlessly simple from the outside, and thoughtfully efficient on the inside — giving you resilient storage, clean caching, and a drastically simplified S3 experience. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on AWS.Messaging.Lambda:
| Repository | Stars |
|---|---|
|
aws/aws-lambda-dotnet
Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 3,891 | 2/25/2026 |
| 1.0.2 | 11,996 | 11/17/2025 |
| 1.0.1 | 18,469 | 7/14/2025 |
| 1.0.0 | 6,056 | 5/5/2025 |
| 0.21.0 | 1,298 | 4/28/2025 |
| 0.20.0-preview | 227 | 4/1/2025 |
| 0.10.2 | 1,302 | 4/8/2025 |
| 0.10.1 | 2,161 | 2/20/2025 |
| 0.10.0 | 11,924 | 8/2/2024 |
| 0.9.1 | 2,740 | 4/22/2024 |
| 0.9.0 | 11,025 | 3/26/2024 |
| 0.1.1-beta | 166 | 3/20/2024 |
| 0.1.0-beta | 292 | 12/8/2023 |