In this article, we will see how we can create an Amazon OpenSearch Service Domain. We will see what is Amazon OpenSearch in details. We can also see the differences between OpenSearch and ElasticSearch.
Creating an Amazon OpenSearch involves several steps, and I’ll guide you through the process in a simple and detailed manner.
This guide will walk you through creating an Amazon OpenSearch Cluster and retrieving the necessary connection details, including the hostname, username, and password.
Table of Contents
Amazon OpenSearch Service?
OpenSearch is an open-source search and analytics engine derived from Apache Lucene. In the context of AWS, Amazon OpenSearch Service is a managed service that makes it easy to deploy, operate, and scale OpenSearch clusters in the AWS Cloud.
AWS OpenSearch Service is fully compatible with open-source and provides additional features and integrations with other AWS services.
Amazon OpenSearch is just a successor to Amazon ElasticSearch service. AWS offers OpenSearch service to perform log analytics, real-time monitoring, visualizing up to unstructured data, and many more. Amazon OpenSearch helps us to perform search and analytical tasks. In the year 2021, AWS Elasticsearch was renamed to OpenSearch.
Here are some key points about Amazon OpenSearch Service:
- Managed Service: AWS OpenSearch Service is a fully managed service, which means AWS takes care of the operational aspects such as hardware provisioning, software installation, patching, and backups.
- Compatibility: Amazon OpenSearch Service is compatible with open-source OpenSearch, which is a distributed search and analytics engine. OpenSearch is built on Apache Lucene and provides a powerful and scalable solution for searching, analyzing, and visualizing large volumes of data.
- Integration with AWS Services: Amazon OpenSearch Service integrates seamlessly with other AWS services, such as Amazon VPC (Virtual Private Cloud), AWS Identity and Access Management (IAM), Amazon CloudWatch, AWS Key Management Service (KMS), and more.
- Security Features: AWS OpenSearch Service provides security features such as VPC support, encryption at rest and in transit, fine-grained access control through IAM and access policies, and integration with AWS Key Management Service for managing encryption keys.
- Use Cases: AWS OpenSearch Service is commonly used for a variety of use cases, including full-text search, log and event data analysis, application monitoring, and more.
Differences Between OpenSearch & ElasticSearch?
- Licensing:
- Elasticsearch: Elasticsearch was initially released under the Apache 2.0 open-source license. However, in 2021, Elastic, the company behind Elasticsearch, changed the license for some of its components to the Server Side Public License (SSPL), which is not recognized as an open-source license by the Open Source Initiative (OSI).
- OpenSearch: OpenSearch is developed as an open-source project under the Apache 2.0 license. This means that the code is open and can be freely used, modified, and distributed.
- Governance and Development:
- Elasticsearch: Development and governance of Elasticsearch were primarily under the control of Elastic, the company that created it. The change in licensing caused some concern within the open-source community.
- OpenSearch: OpenSearch is developed under the governance of the OpenSearch community, which includes multiple contributors and stakeholders. This is seen as a more community-driven and open approach.
- Compatibility:
- Both OpenSearch and Elasticsearch are compatible with each other at the API level. This means that applications and tools built for Elasticsearch can generally work with OpenSearch and vice versa.
- AWS Integration:
- Elasticsearch Service on AWS: Prior to the licensing changes, AWS provided the Elasticsearch Service, which was based on the Elasticsearch open-source project. In response to the licensing changes by Elastic, AWS created OpenSearch and launched the OpenSearch Service as a managed service, providing users with an alternative to Elasticsearch.
- OpenSearch Service on AWS: AWS offers the OpenSearch Service, which is based on the OpenSearch project. It allows users to deploy and manage OpenSearch clusters in a managed AWS environment.
- Community and Ecosystem:
- Elasticsearch: Elasticsearch has a well-established community and ecosystem, with a wide range of plugins, tools, and resources available.
- OpenSearch: OpenSearch is building its own community and ecosystem, and it benefits from the contributions of various organizations and individuals.
Prerequisites
Before proceeding, make sure you have the following prerequisites in place:
- You’ll need an Amazon Web Services (AWS) account. If you don’t have one, you can sign up for a free AWS account.
- Basic knowledge of AWS services and concepts.
Let’s create an OpenSearch Domain:
Step #1:Sign in to the AWS Management Console
Open AWS Management Console. We will create here a domain. Basically, domains are the clusters with settings instance types, instance counts, and storage resources that we will specify.
- Once logged in to the AWS Management Console, search for OpenSearch in the search bar at the top of the page.
- Click on the Amazon OpenSearch Service service from the search results to open the Amazon OpenSearch Service dashboard.
Step #2:Create OpenSearch Service Domain in AWS
- Click on Create a new domain button in the Amazon OpenSearch Service dashboard.
- Enter a new Domain name for your OpenSearch cluster. Mine is “new-domain“.
- In Domain creation method, select Standard create.
- Choose the appropriate deployment configuration, such as Development or Production, based on your requirements. In this example I’m using “Dev/Test” as a Templates.
- Select a deployment option that corresponds to the availability goals for your application. Choose “Domain without standby“. Also choose “1-AZ” Option here for this example for not occuring any extra charges.
- Under the Engine options section, select 2.11(Latest) as the version for your cluster.
- Configure the remaining settings per your requirements, Select an instance family and type that corresponds to the compute, memory, and storage needs of your application.
- Leave remaining settings as default.
- In the Networks section, Select “Public Access” and “Dual Stack Mode“.
- In Fine-grained access control,
- Enable Fine-grained access control
- Choose Create master user
- Enter the Master username as “admin”
- Enter the Master password
- In Access policy,
- Select Only use fine-grained access control
- Review all the settings and make sure they are accurate.
- Click the Confirm button to start the cluster creation process.
Step #3:Wait for the Amazon OpenSearch Cluster to be Created
- The Amazon OpenSearch cluster creation process may take several minutes. Wait for the process to complete.
- You can monitor the progress of the cluster creation on the Amazon OpenSearch Service dashboard.
- Domain status is in a loading state right now. Let’s wait.
- After waiting 15 mins it’s in the Active state now. Here you will get OpenSearch dashboard URL and Domain endpoint. Click on URL to open the Opensearch in new tab.
Step #4: Open OpenSearch Dashboard in AWS
- Enter your username and password which you have given in the above steps.
- Now, let’s move to the OpenSearch dashboard and there we will add some sample data for visualization.
- Let’s add sample data and visualize it in the dashboard. Before that select tenant as “private“. Then I will add here sample e-commerce data.
- So, you can search your data, and analyze your data by adding filters. Also, you can create your own dashboard here.
- So, This is all about how we can use the AWS OpenSearch Service in an efficient way.
- We are all done now!!
Conclusion:
Thank you for sticking to the end. In this article, we have learned how we can create AWS OpenSearch Service Domain. So, This is really very quick and simple. If you like this please share and show your appreciation by giving thumbs-ups, and don’t forget to give me suggestions on how I can improve my future articles that can suit your needs.
Reference:-
- Any queries please contact us @Devopshint.