- Notifications
You must be signed in to change notification settings - Fork0
An end-to-end private Opensearch cluster deployment example. This repo demonstrates various Keyword search functionalities available through Opensearch
License
aws-samples/sample-for-amazon-opensearch-service-tutorials-101
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This project demonstrates various OpenSearch search capabilities through a web application built withCloudscape React and AWS services.
The application provides examples of different search functionalities using Amazon OpenSearch Service, including:
- Keyword Search
- Prefix Match
- Multi Match
- Fuzzy Search
- Minimum Should Match
- Wildcard Match
- Range Filter
- Compound Queries
- Aggregations
- Semantic Search (Disk vs In-Memory modes)
- Hybrid Search (Disk vs In-Memory modes)
- Document Indexing
The application is built using:
- Frontend: React with Cloudscape Design System
- Backend: AWS Lambda functions / API Gateway
- Search: Amazon OpenSearch Service
- Infrastructure: AWS CDK
- Hosting: AWS App Runner
- Authentication: Amazon Cognito
- Node.js 16 or later
- Python 3.10 or later
- AWS CDK v2.91.0
- AWS CLI configured with appropriate credentials
Search for Cloudshell service on the AWS Console and follow the steps below to clone the github repository

Clone thesample-for-amazon-opensearch-tutorials-101 repository using the below command:
git clone https://github.com/aws-samples/sample-for-amazon-opensearch-tutorials-101.git
- Head on to thesample-for-amazon-opensearch-tutorials-101 folder using the below command
cd sample-for-amazon-opensearch-tutorials-101
- Deploy the infrastructure:
sh installer.sh
Note: triggering builder.sh directly runs the script in Cloudshell which could terminate due to inactivity. We recommend running installer.sh which triggers a codebuild job.
Press Enter to confirm deployment
The deployment takes 30 minutes to create all resources. You can track its progress on Cloudformation

Get started by first creating your account on the Opensearch tutorial Application

To test out Keyword search functionality, first index some products on the Opensearch tutorial application. Every feature is also accompanied by a guide, best practices and links to the Opensearch documentation. You could also index a custom product.

Note: The builder script will:
- Deploy the Lambda Layer Stack
- Build and deploy the OpenSearch Proxy Stack
- Build and deploy the UI container
- Deploy the App Runner hosting stack
The application supports three environments:
- dev
- qa
- sandbox
Configuration for each environment is managed incdk.json.
Delete all the deployed resources
cdk destroy
.├── app.py # CDK app entry point├── artifacts/│ ├── index_lambda/ # Document indexing function│ ├── opensearch-app-ui/ # React frontend application│ └── search_lambda/ # Search functionality├── builder.sh # Deployment automation script├── search_tutorials/ # CDK infrastructure stacks└── requirements.txt # Python dependenciesThe application implements several security measures:
- Private VPC for OpenSearch domain
- AWS IAM roles and policies for service access
- HTTPS enforcement for all API endpoints
- Cognito user authentication
The UI is located inartifacts/opensearch-app-ui/ and can be run locally:
cd artifacts/opensearch-app-uinpm installnpm run devInfrastructure is defined using AWS CDK in thesearch_tutorials/ directory:
lambda_layer_stack.py: Lambda layers for dependenciesopensearch_proxy_stack.py: OpenSearch domain and Lambda functionsapprunner_hosting_stack.py: UI hosting configurationDeepWiki Docs :https://deepwiki.com/aws-samples/sample-for-amazon-opensearch-tutorials-101
About
An end-to-end private Opensearch cluster deployment example. This repo demonstrates various Keyword search functionalities available through Opensearch
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.


