Defined in: src/constructs/idempotency-table/idempotency-table.ts:62
A DynamoDB table construct optimized for AWS Lambda Powertools idempotency functionality.
This construct creates a DynamoDB table with sensible defaults for idempotency use cases while enforcing specific requirements needed by the AWS Lambda Powertools library:
- Partition key is always 'id' (STRING type)
- TTL attribute is always 'expiration'
- No sort key is allowed (simple primary key only)
All other DynamoDB table properties can be customized as needed.
Example
// Basic usage with defaults
const idempotencyTable = new IdempotencyTable(this, 'IdempotencyTable', {
tableName: 'my-function-idempotency'
});
// Custom configuration
const customTable = new IdempotencyTable(this, 'CustomTable', {
tableName: 'custom-idempotency-table',
removalPolicy: RemovalPolicy.RETAIN,
readCapacity: 10,
writeCapacity: 10,
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: true
}
});
Extends
Construct
Constructors
Constructor
new IdempotencyTable(
scope,id,props):IdempotencyTable
Defined in: src/constructs/idempotency-table/idempotency-table.ts:68
Parameters
scope
Construct
id
string
props
Returns
IdempotencyTable
Overrides
Construct.constructor
Properties
node
readonlynode:Node
Defined in: node_modules/.pnpm/constructs@10.0.5/node_modules/constructs/lib/construct.d.ts:305
The tree node.
Stability
stable
Inherited from
Construct.node
table
readonlytable:Table
Defined in: src/constructs/idempotency-table/idempotency-table.ts:66
The underlying DynamoDB table.
Methods
toString()
toString():
string
Defined in: node_modules/.pnpm/constructs@10.0.5/node_modules/constructs/lib/construct.d.ts:319
Returns a string representation of this construct.
Returns
string
Stability
stable
Inherited from
Construct.toString
isConstruct()
staticisConstruct(x):x is Construct
Defined in: node_modules/.pnpm/constructs@10.0.5/node_modules/constructs/lib/construct.d.ts:299
(deprecated) Checks if x is a construct.
Parameters
x
any
Any object.
Returns
x is Construct
true if x is an object created from a class which extends Construct.
Deprecated
use x instanceof Construct instead
Inherited from
Construct.isConstruct