Skip to content

Elasticsearch Service

CloudMock emulates Amazon Elasticsearch Service (legacy), supporting domain management, configuration, tagging, and basic document indexing and search operations.

OperationStatusNotes
CreateElasticsearchDomainSupportedCreates an Elasticsearch domain
DescribeElasticsearchDomainSupportedReturns domain details
ListDomainNamesSupportedLists all domain names
DeleteElasticsearchDomainSupportedDeletes a domain
UpdateElasticsearchDomainConfigSupportedUpdates domain configuration
DescribeElasticsearchDomainConfigSupportedReturns domain configuration
AddTagsSupportedAdds tags to a domain
RemoveTagsSupportedRemoves tags from a domain
ListTagsSupportedLists tags for a domain
IndexDocumentSupportedIndexes a document
SearchSupportedPerforms a basic search
ClusterHealthSupportedReturns cluster health status
import { ElasticsearchServiceClient, CreateElasticsearchDomainCommand } from '@aws-sdk/client-elasticsearch-service';
const client = new ElasticsearchServiceClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateElasticsearchDomainCommand({
DomainName: 'my-domain',
ElasticsearchVersion: '7.10',
}));
import boto3
client = boto3.client('es',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_elasticsearch_domain(
DomainName='my-domain',
ElasticsearchVersion='7.10')
cloudmock.yml
services:
es:
enabled: true
  • No actual Elasticsearch cluster is provisioned
  • Search returns basic in-memory results, not full Elasticsearch query DSL
  • Cluster health always reports green
  • Consider using the OpenSearch service for new projects