Skip to content

Maintenance: expose record status & expiry config + make DynamoDB deps optional #1678

@dreamorosi

Description

@dreamorosi

Summary

While working on #1484 I realized that in order to make it easy to create your own Idempotency provider there are a few items that need to be tweaked:

  • Some persistence layers require a default ttl setting when instantiating a client, this info is already available in the BasePersistenceLayer class that is extended when creating your own provider, but it's not exposed to children
  • The IdempotencyRecordStatus is an object that maps constants to values (aka similar to an Enum). Currently this is part of the types folder & exports, which is confusing and also wrong, since it's not a type.
  • When not using the DynamoDBPersistenceLayer there's no reason why customers should install the @aws-sdk/lib-dynamodb module

This issue serves to track the work to change these items.

Why is this needed?

So that customers creating their own persistence layer for Idempotency or extending the default one can have a better DX.

Which area does this relate to?

Idempotency

Solution

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedidempotencyThis item relates to the Idempotency UtilityinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)

Type

No type

Projects

Status

Shipped

Relationships

None yet

Development

No branches or pull requests

Issue actions