{
  "id": 2246407,
  "title": "Adding Semantic Search to an Existing DynamoDB Table with Vector Indexes",
  "url": "https://urgent.news/2026/08/20/adding-semantic-search-to-an-existing-dynamodb-table-with-vector",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-20T22:48:31.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/aws-builders/adding-semantic-search-to-an-existing-dynamodb-table-with-vector-indexes-4icj"
  },
  "original_language": "en",
  "account": "When asked to add search functionality to an application, the complexity and overhead involved can be significant. Maintaining extra components, managing potential failure points, and ensuring data consistency can be a challenge. For the past few years, the author has been working with DynamoDB, and with the introduction of Vector Search, they feel more comfortable incorporating this type of functionality.\n\nAWS has recently released another vector store, and this post aims to demonstrate how to add vector search to an existing DynamoDB table. The current API utilizes a serverless setup, including SAM for infrastructure, API Gateway in front, Lambda functions behind, and DynamoDB for storage. The API currently provides basic CRUD operations to manage recipes, such as create, read, update, delete, and list.\n\nAdding filters to query specific data becomes complex when using DynamoDB, as it requires creating Global Secondary Indexes (GSI) for each permutation, which is not scalable. Traditionally, a separate data pipeline was necessary to index the data and provide search functionality. However, with the advent of vector search in DynamoDB, vector embeddings can be stored alongside the data, enabling direct search. This allows users to search recipes using natural language queries based on the meaning, rather than just exact keyword matches.\n\nSemantic search works by converting text into embeddings, which are lists of numbers representing the meaning of the text. Texts with similar meanings end up close together in the vector space, allowing for searching by intent instead of keywords. To add vector embeddings, the Amazon Bedrock's Titan Text Embeddings V2 model is used, which produces 1024-dimension vectors normalized using cosine similarity. The text to be embedded includes the recipe's name, description, cuisine, dietary tags, ingredients, preparation time, and cooking time.\n\nA function is created to build the embedding text by combining the recipe's key fields into a single string. The embedding is then generated inline, making every item searchable as soon as it's written. DynamoDB vector indexes enable this functionality without the need for a separate service. The embedding is stored as an attribute on the item, and a vector index is created over that attribute. Queries can be made using a dedicated similarity API.\n\nThe vector index is not supported by CloudFormation, so a script is added to run after deployment to create the index using the UpdateTable command if it doesn't already exist. The index is configured with cosine distance, 1024 dimensions to match the Titan output, and an inline filter on cuisine. This allows for prefiltering results, similar to a regular DynamoDB index's partition key but without being required.",
  "summary": "Whenever someone asks me to add search to an application, I try to find ways around it. The implementation itself isn't the problem, it's everything that comes with it: extra components to manage, more failure points, and the constant challenge of keeping data in sync. For the past few years, I've worked a lot with DynamoDB and with the introduction of Vector Search I feel a lot more comfortable…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}