Skip to main content
net8.0net10.0

Powertools for AWS Lambda (.NET) - Idempotency package.

Published
Mar 12, 2026
7mo ago
Total Downloads
451.0K
450,970

Install

dotnet add package AWS.Lambda.Powertools.Idempotency --version 3.2.0
ProductVersions
.NET
net10.0net8.0

README

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.aws.amazon.com/powertools/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());
    }
}

Changes from Previous Version

No structural changes between v3.1.0 and v3.2.0.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.