Class DynamoDBPersistenceStore
java.lang.Object
software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStore
- All Implemented Interfaces:
PersistenceStore
DynamoDB version of the
Use the
PersistenceStore. Will store idempotency data in DynamoDB.Use the
DynamoDBPersistenceStore.Builder to create a new instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUse this builder to get an instance ofDynamoDBPersistenceStore.
With this builder you can configure the characteristics of the DynamoDB Table (name, key, sort key, and other field names).
You can also set a customDynamoDbClientfor further tuning. -
Field Summary
FieldsFields inherited from class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
payloadValidationEnabled -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voiddeleteRecord(String idempotencyKey) voidputRecord(DataRecord record, Instant now) Store's the given idempotency record in the DDB store.voidupdateRecord(DataRecord record) Methods inherited from class software.amazon.lambda.powertools.idempotency.persistence.BasePersistenceStore
configure, deleteRecord, getRecord, saveInProgress, saveSuccess
-
Field Details
-
IDEMPOTENCY
- See Also:
-
-
Method Details
-
builder
-
getRecord
- Specified by:
getRecordin interfacePersistenceStore- Throws:
IdempotencyItemNotFoundException
-
putRecord
Store's the given idempotency record in the DDB store. If there is an existing record that has expired - either due to the cache expiry or due to the in_progress_expiry - the record will be overwritten and the idempotent operation can continue. Note: This method writes only expiry and status information - not the results of the operation itself.- Specified by:
putRecordin interfacePersistenceStore- Parameters:
record- DataRecord instance to storenow-- Throws:
IdempotencyItemAlreadyExistsException
-
updateRecord
- Specified by:
updateRecordin interfacePersistenceStore
-
deleteRecord
- Specified by:
deleteRecordin interfacePersistenceStore
-