What you’ll do
- Create an OpenSearch domain in the AWS console
- Connect to the cluster and OpenSearch Dashboards
- Add sample data and explore prebuilt dashboards
- Inspect indices and mappings
- Query documents in Discover
- Index documents via the REST API (single PUT and bulk)
- Clean up the domain to avoid charges
1) Create a domain (cluster)
- Open the AWS Console, search for OpenSearch, and open the service page.
- Click Create domain. A domain is an OpenSearch cluster with its own instance configuration, storage, and settings.
- Choose Standard create to view and control each option (use Easy create only for fast experiments).
- Select a template: Production for production workloads or Dev/Test for demos and labs (this guide uses Dev/Test).
Example ARN format for IAM principals:
admin + a strong password). If fine-grained access control is enabled, OpenSearch Dashboards will require these credentials on login.

Using public access makes your cluster reachable from the internet. For production use a VPC and restrictive security groups. Only use public access for short-lived demos.
2) Connect to the cluster
- When the domain status becomes Active, open domain details to find the Cluster endpoint and the OpenSearch Dashboards URL.
- Use the cluster endpoint for API calls and the Dashboards URL for the UI.
- Log in to OpenSearch Dashboards with the master username/password. On first login you’ll be prompted about tenants — the default Global tenant is fine for demos.
Keep your domain endpoint and master credentials private. Consider storing credentials in a secrets manager for repeatable scripts.

3) Add sample data in OpenSearch Dashboards
- Open OpenSearch Dashboards and choose Add data.
- Select a sample dataset (e.g., Sample eCommerce orders, Sample flight data, or Sample web logs).
- Click Add data to install the dataset and then View Data to open its dashboard and indices.


4) Inspect indices and mappings
- In OpenSearch Dashboards go to Management → Index Management → Indices to see indices created by the sample dataset.
- Select an index and open the Mappings tab to view defined fields and types. Reviewing mappings helps you plan queries, aggregations, and future index settings.

5) Explore documents with Discover
- Open Discover in Dashboards, choose the correct index pattern for your dataset, and browse documents.
- Adjust the time range (e.g., last 7 days) and use the left-hand field list to filter or add fields to the display.
- Example: add filters for
manufacturer=Pyramid Distributionanddays_of_week=Saturdayto show documents matching both conditions.

6) Indexing documents via the REST API (curl)
AWS documentation includes curl examples for indexing. Replaceadmin, Password123!, and the domain endpoint with your master username, password, and the domain endpoint URL.
Reference:
Index a single document (PUT)
Example PUT request to index one document into an index namedmovies:
Bulk indexing (multiple documents)
- Create a local file
bulk_movies.jsoncontaining newline-delimited JSON (action/metadata line followed by the document source line for each item). Examplebulk_movies.json:
- Call the bulk API:
7) Verify documents in Dashboards
- In OpenSearch Dashboards go to Management → Index Patterns and create an index pattern named
movies. - Open Discover, select the
moviespattern, and search for terms (for example,Downey Jr., Robert) to validate newly indexed documents.
8) Clean up
To avoid ongoing charges, delete the OpenSearch domain when you finish:- Open the OpenSearch console → Domains → select your domain → Delete.
Links and references
- Amazon OpenSearch Service Developer Guide: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/
- OpenSearch project: https://opensearch.org/
- More on indexing and the Bulk API: https://opensearch.org/docs/latest/opensearch/rest-api/bulk/