Skip to content

OpenSearch

CloudMock emulates Amazon OpenSearch Service, supporting domain management, configuration, upgrades, version compatibility, VPC endpoints, tagging, and basic document indexing and search. Domain states transition Processing -> Active.

OperationStatusNotes
CreateDomainSupportedCreates an OpenSearch or Elasticsearch domain
DescribeDomainSupportedReturns domain details
DescribeDomainsSupportedReturns details for multiple domains by name
ListDomainNamesSupportedLists all domain names
DeleteDomainSupportedDeletes a domain
UpdateDomainConfigSupportedUpdates cluster config or EBS options
DescribeDomainConfigSupportedReturns full domain configuration
GetCompatibleVersionsSupportedReturns compatible upgrade versions for a domain or all versions
CreateVpcEndpointSupportedCreates a VPC endpoint for a domain
DescribeVpcEndpointsSupportedReturns details for VPC endpoints by ID
ListVpcEndpointsSupportedLists VPC endpoints, optionally filtered by domain ARN
DeleteVpcEndpointSupportedDeletes a VPC endpoint
AddTagsSupportedAdds tags to a domain by ARN
RemoveTagsSupportedRemoves tags from a domain
ListTagsSupportedLists tags for a domain
UpgradeDomainSupportedInitiates a domain engine version upgrade
GetUpgradeStatusSupportedReturns current upgrade status
IndexDocumentSupportedIndexes a document in an in-memory store
SearchSupportedPerforms a basic match query search
ClusterHealthSupportedReturns cluster health (green/yellow/red)
import { OpenSearchClient, CreateDomainCommand } from '@aws-sdk/client-opensearch';
const client = new OpenSearchClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateDomainCommand({
DomainName: 'my-domain',
EngineVersion: 'OpenSearch_2.11',
}));
import boto3
client = boto3.client('opensearch',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_domain(
DomainName='my-domain',
EngineVersion='OpenSearch_2.11')
cloudmock.yml
services:
opensearch:
enabled: true
  • No actual OpenSearch cluster is provisioned
  • Search returns basic in-memory results, not full OpenSearch query DSL
  • Cluster health always reports green
  • Domain upgrades are simulated status changes