DynamoDB persistence layer for idempotency records.

This class uses the AWS SDK for JavaScript v3 to write and read idempotency records from DynamoDB.

There are various options to configure the persistence layer, such as the table name, the key attribute, the status attribute, etc.

With default configuration you don't need to create the client beforehand, the persistence layer will create it for you. You can also bring your own AWS SDK V3 client, or configure the client with the clientConfig option.

See the Idempotency documentation for more details on the IAM permissions and DynamoDB table configuration.

Example

import { DynamoDBPersistenceLayer } from '@aws-lambda-powertools/idempotency/dynamodb';

const persistence = new DynamoDBPersistenceLayer({
tableName: 'my-idempotency-table',
});

See

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dynamodb/index.html

Implements

Hierarchy (view full)

Constructors

Properties

idempotencyKeyPrefix: string

Methods