AWS.Lambda.Powertools.Idempotency
1.1.0
Prefix Reserved
See the version list below for details.
dotnet add package AWS.Lambda.Powertools.Idempotency --version 1.1.0
NuGet\Install-Package AWS.Lambda.Powertools.Idempotency -Version 1.1.0
<PackageReference Include="AWS.Lambda.Powertools.Idempotency" Version="1.1.0" />
paket add AWS.Lambda.Powertools.Idempotency --version 1.1.0
#r "nuget: AWS.Lambda.Powertools.Idempotency, 1.1.0"
// Install AWS.Lambda.Powertools.Idempotency as a Cake Addin #addin nuget:?package=AWS.Lambda.Powertools.Idempotency&version=1.1.0 // Install AWS.Lambda.Powertools.Idempotency as a Cake Tool #tool nuget:?package=AWS.Lambda.Powertools.Idempotency&version=1.1.0
AWS Lambda Idempotency for .NET
The idempotency package provides a simple solution to convert your Lambda functions into idempotent operations which are safe to retry.
Terminology
The property of idempotency means that an operation does not cause additional side effects if it is called more than once with the same input parameters.
Idempotent operations will return the same result when they are called multiple times with the same parameters. This makes idempotent operations safe to retry. Read more about idempotency.
Idempotency key is a hash representation of either the entire event or a specific configured subset of the event, and invocation results are JSON serialized and stored in your persistence storage layer.
Key features
- Prevent Lambda handler function from executing more than once on the same event payload during a time window
- Ensure Lambda handler returns the same result when called with the same payload
- Select a subset of the event as the idempotency key using JMESPath expressions
- Set a time window in which records with the same payload should be considered duplicates
- Expires in-progress executions if the Lambda function times out halfway through
Read the docs
For a full list of features go to docs.powertools.aws.dev/lambda/dotnet/utilities/idempotency/
GitHub: https://github.com/aws-powertools/powertools-lambda-dotnet/
Installation
You should install with NuGet:
Install-Package Amazon.Lambda.PowerTools.Idempotency
Or via the .NET Core command line interface:
dotnet add package Amazon.Lambda.PowerTools.Idempotency
Sample Function
public class Function
{
public Function()
{
Idempotency.Configure(builder => builder.UseDynamoDb("idempotency_table"));
}
[Idempotent]
public Task<string> FunctionHandler(string input, ILambdaContext context)
{
return Task.FromResult(input.ToUpper());
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
-
net6.0
- Amazon.Lambda.Core (>= 2.1.0)
- AspectInjector (>= 2.8.1)
- AWSSDK.DynamoDBv2 (>= 3.7.201.8)
- JmesPath.Net (>= 1.0.308)
-
net8.0
- Amazon.Lambda.Core (>= 2.1.0)
- AspectInjector (>= 2.8.1)
- AWSSDK.DynamoDBv2 (>= 3.7.201.8)
- JmesPath.Net (>= 1.0.308)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on AWS.Lambda.Powertools.Idempotency:
Repository | Stars |
---|---|
aws-powertools/powertools-lambda-dotnet
Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
|
Version | Downloads | Last updated |
---|---|---|
1.2.2 | 13,571 | 9/2/2024 |
1.1.1 | 9,824 | 3/10/2024 |
1.1.0 | 12,764 | 2/16/2024 |
1.0.0 | 7,320 | 11/21/2023 |
0.2.2-preview | 2,638 | 9/19/2023 |
0.1.0-preview | 235 | 8/29/2023 |
0.0.2-preview | 227 | 8/22/2023 |
0.0.1-preview | 663 | 6/21/2023 |