Skip to main content
This guide shows an end-to-end demo using Amazon OpenSearch: creating a domain (cluster), exploring OpenSearch Dashboards, loading sample data, and indexing your own documents with curl. It’s ideal for hands-on learning and quick prototyping.
Screenshot of the Amazon OpenSearch Service dashboard in the AWS console showing domain health. It lists one domain named "test" with status "Deleting" and shows zero red/yellow/green domains.
A domain in OpenSearch is essentially a managed cluster. When you create a domain you provision instance types, node counts, storage, and networking that form that cluster.

Create an OpenSearch domain

Follow these steps to create a domain named demo for this walkthrough. Use Standard create to see all configuration options (Easy create uses sensible defaults and is fine for quick tests).
  1. Enter a domain name (e.g., demo).
  2. Choose a creation path:
    • Easy create — fast, with defaults.
    • Standard create — full configuration control (used here).
  3. Select a template:
    • Production — resilient defaults for production.
    • Dev/Test — lighter-weight defaults for development (choose this for the demo).
  4. Enable standby nodes only for production-level high availability; skip for the demo.
  5. Choose the number of Availability Zones — single AZ is OK for development; multi-AZ recommended for production resiliency.
An AWS console screenshot of the Amazon OpenSearch domain creation page showing template and deployment option selections (Production vs Dev/test) and availability zone radio buttons. A right-hand Summary panel lists engine version (OpenSearch 2.9), data node specs, storage and encryption settings with Create/Cancel buttons.
Additional key settings:
  • Engine version: pick a supported version (e.g., OpenSearch 2.9).
  • Data nodes: choose an instance class (for demo: t3.small.search) and nodes per AZ (e.g., 1).
  • Storage: EBS volumes — choose type and size (demo uses 10 GiB).
  • Dedicated master nodes: enable for medium/large clusters; disable for small demos.
  • Networking: public access for rapid testing, or VPC access for production.
  • Access control: use IAM-based access or create a master user (for this demo we create a master user admin with a secure password).
ARN format (example): arn:<partition>:iam::<account>:<type>/<id> Configure fine-grained access control, encryption at rest, TLS for in-transit encryption, and automatic updates as needed. Domain provisioning typically takes 10–20 minutes.
For any production workload, avoid public access and weak passwords. Use VPC deployment, encryption (at rest and in transit), snapshots, fine-grained access control, and least-privilege IAM roles.

OpenSearch cluster ready

Once your domain status shows Active/Green, open the domain details. You’ll find:
  • Domain endpoint (use for API requests).
  • OpenSearch Dashboards URL (web UI for exploration).
  • Cluster configuration summary.
A screenshot of the Amazon OpenSearch Service console in the AWS web UI showing a domain named "demo." The page displays general information (ARN, status as Active/Green), OpenSearch version, cluster configuration and the domain endpoint URL.
Click the Dashboards URL and sign in with the master username/password you created (admin / your password). On first login you may be prompted to select a tenant; Global is fine for this demo.

Add sample data using OpenSearch Dashboards

OpenSearch Dashboards includes sample datasets for testing and visualization. To add sample data:
  • In Dashboards, click Add data and choose a dataset (e.g., e-commerce orders).
  • Install the dataset, then click View data to inspect dashboards, visualizations, and underlying indices.
A screenshot of an OpenSearch eCommerce Revenue Dashboard showing KPIs and visualizations — charts for transactions/day (139), sales by gender, average spend (75.25), average items per order (2.163), total revenue (77,583.36) and category/time area charts. The dashboard includes filters and controls across the top.
To inspect the index that Dashboards created:
  • Go to Management → Index Management → Indices.
  • Select the sample index (e.g., opensearch_dashboards_sample_data_ecommerce).
  • View Mappings to see field names and types.
A screenshot of the OpenSearch Dashboards "Index mappings" view showing field mappings for an ecommerce sample index. The left panel lists fields like category, currency, customer_first_name, customer_id, geoip, and continent_name with their data types.
Use Discover to inspect documents and experiment with filters, time ranges, and field selection. Example: filter by manufacturer = Pyramid Industries and by day_of_week = Saturday to narrow results.

Index your own documents with curl

Amazon OpenSearch supports regular Elasticsearch-compatible REST APIs. The AWS OpenSearch docs are a good reference: Amazon OpenSearch Service Developer Guide. Replace domain-endpoint, master-user, and master-user-password with your values when running these commands. Create (index) a single document:
Successful response (abridged):
Example with a real-style domain endpoint:
A screenshot of the Amazon OpenSearch Service console showing details for a domain named "demo," including general information (Domain ARN, status Active, cluster health Green) and links for the OpenSearch Dashboards URL and domain endpoint. The page also shows cluster configuration and navigation menus on the left.

Bulk upload multiple documents

For many documents, use the _bulk API with a newline-delimited file (action line + data line pairs). Example bulk_movies.json content (NDJSON):
Upload with curl:
Sample successful bulk response:
After bulk upload, refresh Dashboards or create an index pattern to surface the new data.

Create an index pattern and search in Dashboards

  • In Dashboards → Management → Index Patterns, create a pattern for movies.
  • In Discover, choose the movies index pattern and run searches or filters.
  • Example search: look for documents where actor is Downey Jr., Robert.
Quick reference — common API actions:

Clean up

To remove your demo domain and avoid charges:
  • Open the OpenSearch Domains page in the AWS console.
  • Select your domain and click Delete. Confirm to remove the domain and all data.
If you plan to keep a cluster, follow AWS best practices: deploy in a VPC, enable encryption at rest and in transit, schedule automated snapshots, configure fine-grained access control, and apply least-privilege IAM roles.
This walkthrough covered creating an Amazon OpenSearch domain, using OpenSearch Dashboards sample data, inspecting index mappings, indexing documents via curl (single and bulk), creating index patterns in Dashboards, and cluster cleanup. For more details and advanced topics, see the Amazon OpenSearch Service Developer Guide.

Watch Video