
Amazon DynamoDB is purpose built as a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. Being purpose built means DynamoDB excels at some tasks, but isn’t a good fit for others.
While some search patterns, such as retrieving records at various depths of a hierarchy can be achieved efficiently with DynamoDB, DynamoDB does not support full-text search directly.
For use cases that have a requirement for full text search alongside their other access patterns, DynamoDB can effectively integrate with Amazon OpenSearch Service.
OpenSearch is an open source, distributed search and analytics suite derived from Elasticsearch. As items are written to a DynamoDB table, DynamoDB Streams can be used for change data capture and integration with OpenSearch.
DynamoDB Streams captures a time-ordered sequence of item-level modifications in any DynamoDB table and stores this information in a log for up to 24 hours. Amazon DynamoDB is integrated with AWS Lambda so that you can create code that automatically responds to events in DynamoDB Streams.
You can use DynamoDB Steams with Lambda to listen for changes in the database and insert documents into OpenSearch where it will be indexed and available for full-text search.
Further Reading
A more in-depth discussion on ingesting data from DynamoDB into OpenSearch, along with code examples, can be found at https://docs.aws.amazon.com/opensearch-service/latest/developerguide/integrations.html#integrations-dynamodb