Amazon Kendra · Arazzo Workflow

Amazon Kendra Create Thesaurus and Query

Version 1.0.0

Load a custom synonym thesaurus from S3 into an index, wait until it is active, then run a synonym-aware query.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Artificial IntelligenceEnterprise SearchKnowledge-ManagementMachine-LearningNatural-LanguageArazzoWorkflows

Provider

amazon-kendra

Workflows

create-thesaurus-and-query
Create a thesaurus, confirm it via ListThesauri, then run a synonym-aware query.
Creates a custom synonym thesaurus from an S3 file, lists the index thesauri to confirm it was registered, and runs a search query that benefits from the synonym expansion.
3 steps inputs: description, indexId, queryText, roleArn, sourceS3Path, thesaurusName outputs: queryId, resultItems, thesaurusId
1
createThesaurus
Create the custom synonym thesaurus from the supplied Solr-format S3 file so the index can expand queries across the defined synonyms.
2
confirmThesaurus
List the index thesauri to confirm the newly created thesaurus is registered. The spec provides no DescribeThesaurus operation, so listing is used in place of a per-thesaurus status poll.
3
query
Run the search query against the index so synonym expansion from the new thesaurus is applied to the results.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Amazon Kendra Create Thesaurus and Query
  summary: Load a custom synonym thesaurus from S3 into an index, wait until it is active, then run a synonym-aware query.
  description: >-
    Loads a Solr-format synonym thesaurus from Amazon S3 into an Amazon Kendra
    index so that user queries expand across custom synonyms, lists the index
    thesauri to confirm registration, and then runs a Query that benefits from
    the new synonym expansion. The spec does not expose a DescribeThesaurus
    operation, so this flow adapts by confirming the thesaurus through
    ListThesauri rather than polling a per-thesaurus status. Each step inlines
    its request, including the AWS JSON protocol X-Amz-Target header, so the flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: queriesApi
  url: ../openapi/amazon-kendra-queries-api-openapi.yml
  type: openapi
- name: thesaurusApi
  url: ../openapi/amazon-kendra-thesaurus-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-thesaurus-and-query
  summary: Create a thesaurus, confirm it via ListThesauri, then run a synonym-aware query.
  description: >-
    Creates a custom synonym thesaurus from an S3 file, lists the index thesauri
    to confirm it was registered, and runs a search query that benefits from the
    synonym expansion.
  inputs:
    type: object
    required:
    - indexId
    - thesaurusName
    - roleArn
    - sourceS3Path
    - queryText
    properties:
      indexId:
        type: string
        description: The identifier of the index to add the thesaurus to.
      thesaurusName:
        type: string
        description: The name for the thesaurus.
      roleArn:
        type: string
        description: The IAM role ARN granting Kendra access to the thesaurus file.
      sourceS3Path:
        type: object
        description: The S3 path where the Solr-format thesaurus file sits.
      description:
        type: string
        description: An optional description for the thesaurus.
      queryText:
        type: string
        description: The search query to run once the thesaurus is registered.
  steps:
  - stepId: createThesaurus
    description: >-
      Create the custom synonym thesaurus from the supplied Solr-format S3 file
      so the index can expand queries across the defined synonyms.
    operationId: CreateThesaurus
    parameters:
    - name: IndexId
      in: path
      value: $inputs.indexId
    - name: X-Amz-Target
      in: header
      value: AWSKendraFrontendService.CreateThesaurus
    requestBody:
      contentType: application/json
      payload:
        Name: $inputs.thesaurusName
        RoleArn: $inputs.roleArn
        SourceS3Path: $inputs.sourceS3Path
        Description: $inputs.description
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      thesaurusId: $response.body#/Id
  - stepId: confirmThesaurus
    description: >-
      List the index thesauri to confirm the newly created thesaurus is
      registered. The spec provides no DescribeThesaurus operation, so listing is
      used in place of a per-thesaurus status poll.
    operationId: ListThesauri
    parameters:
    - name: IndexId
      in: path
      value: $inputs.indexId
    - name: X-Amz-Target
      in: header
      value: AWSKendraFrontendService.ListThesauri
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      thesaurusSummaryItems: $response.body#/ThesaurusSummaryItems
  - stepId: query
    description: >-
      Run the search query against the index so synonym expansion from the new
      thesaurus is applied to the results.
    operationId: Query
    parameters:
    - name: IndexId
      in: path
      value: $inputs.indexId
    - name: X-Amz-Target
      in: header
      value: AWSKendraFrontendService.Query
    requestBody:
      contentType: application/json
      payload:
        QueryText: $inputs.queryText
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      queryId: $response.body#/QueryId
      resultItems: $response.body#/ResultItems
  outputs:
    thesaurusId: $steps.createThesaurus.outputs.thesaurusId
    queryId: $steps.query.outputs.queryId
    resultItems: $steps.query.outputs.resultItems

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/amazon-kendra-create-thesaurus-and-query-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.