AWS.Lambda.Powertools.Idempotency 1.2.2

Prefix Reserved
dotnet add package AWS.Lambda.Powertools.Idempotency --version 1.2.2                
NuGet\Install-Package AWS.Lambda.Powertools.Idempotency -Version 1.2.2                
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="AWS.Lambda.Powertools.Idempotency" Version="1.2.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AWS.Lambda.Powertools.Idempotency --version 1.2.2                
#r "nuget: AWS.Lambda.Powertools.Idempotency, 1.2.2"                
#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.
// Install AWS.Lambda.Powertools.Idempotency as a Cake Addin
#addin nuget:?package=AWS.Lambda.Powertools.Idempotency&version=1.2.2

// Install AWS.Lambda.Powertools.Idempotency as a Cake Tool
#tool nuget:?package=AWS.Lambda.Powertools.Idempotency&version=1.2.2                

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 18,654 9/2/2024
1.1.1 10,293 3/10/2024
1.1.0 14,202 2/16/2024
1.0.0 7,402 11/21/2023
0.2.2-preview 2,641 9/19/2023
0.1.0-preview 238 8/29/2023
0.0.2-preview 230 8/22/2023
0.0.1-preview 707 6/21/2023