The AWS SDK creates a Snapshot of the credentials when creating the underlying DynamoDB client, if you use short-lived credentials (for instance with Cognito Identity) you have to ensure the credentials are valid before making requests.
session-validity-ensurer.snippet.ts
import { updateDynamoEasyConfig } from'@shiftcoders/dynamo-easy'updateDynamoEasyConfig({sessionValidityEnsurer: ():Promise<void> => {// do whatever you need to do to make sure the session is valid// and return an Promise<void> when donereturnPromise.resolve() },})
Logging
To receive log statements from dynamo-easy you can provide a function
To use different table names per stage you can provide the tableNameResolver function.
This function will receive the default table name (either resolved using the model name or custom value when a tableName was provided in the @Model decorator) and needs to return the extended table name as string.
If you want to use a different type for the @DateProperty decorator (eg. Moment or DayJS) you need to define a custom mapper and register it in dynamo-easy easy config.