Skip to main content
This data layer also supports the BaseStorageClient that enables you to store your elements into AWS S3 or Azure Blob Storage.

Example

Here is an example of setting up this data layer. First install boto3:
Import the custom data layer and storage client, and set the cl_data._data_layer variable at the beginning of your Chainlit app.

Table structure

Here is the Cloudformation used to create the dynamo table:

Logging

DynamoDB data layer defines a child of chainlit logger.

Limitations

Filtering by positive/negative feedback is not supported. The data layer methods are not async. Boto3 is not async and therefore the data layer uses non-async blocking io.

Design

This implementation uses Single Table Design. There are 4 different entity types in one table identified by the prefixes in PK & SK. Here are the entity types: