AWS OpenSearch: product search setup with curl
Learn to create an AWS OpenSearch domain and product index, then use curl to add five documents, search, update, delete and check the count.
Player not loading? Watch on YouTube
This tutorial builds a small product search system with Amazon OpenSearch Service and its REST API. The speaker introduces OpenSearch as an open source search and analytics engine and compares its domains, indexes and documents with databases and tables in Amazon RDS. The walkthrough uses AWS infrastructure rather than a self-hosted installation.
The domain setup uses the dev/test template, engine version 3.7, one availability zone, one R8G medium search node and a 10 GB EBS volume. The speaker says domain creation takes around 20 to 30 minutes and uses an existing domain for the demonstration. Public IPv4 access and disabled fine-grained access control are demo choices; the speaker describes VPC placement and multiple availability zones as production considerations.
In AWS CloudShell, the presenter exports the domain endpoint and tests it with curl. The initial request fails because the access policy denies it. After allowing the CloudShell IP address, the presenter creates a products index with field mappings and inserts five product documents.
The remaining examples retrieve a document by ID, run match_all and a name-based match query, update a price and delete a document. A count request then returns four documents. Advanced filters, sorting, pagination and aggregations are reserved for part two. AWS hosting incurs ongoing charges. The name-based match example searches analyzed text terms; the presenter’s prefix analogy should not be read as a general prefix-query guarantee.