Amazon OpenSearch Serverless is a completely managed search and analytics service that routinely provisions and scales infrastructure that can assist you run search and analytics workloads with out cluster administration. With OpenSearch Serverless, you may rapidly construct search and analytics capabilities into your functions.
As organizations scale their use of OpenSearch Serverless, understanding community structure and DNS administration turns into more and more necessary. Constructing upon the connectivity patterns mentioned in our earlier publish Community connectivity patterns for Amazon OpenSearch Serverless, this publish covers superior deployment situations targeted on centralized and distributed entry patterns—particularly, how enterprises can simplify community connectivity throughout a number of AWS accounts and lengthen entry to on-premises environments for his or her OpenSearch Serverless deployments.
We define two key deployment patterns:
- Sample 1 – A centralized endpoint mannequin the place interface digital non-public cloud (VPC) endpoints for OpenSearch Serverless are deployed in a shared providers VPC, permitting spoke VPCs from different AWS accounts and on premises to entry OpenSearch Serverless collections via these consolidated endpoints.
- Sample 2 – A distributed endpoint mannequin the place interface VPC endpoints are created in particular person spoke VPCs, with a number of customers (central account, on-premises networks, and different spoke accounts) accessing these endpoints via centralized DNS administration. This method offers direct connectivity inside every spoke VPC whereas sustaining centralized DNS management and administration throughout the group.
Earlier than diving into superior deployment patterns, let’s evaluation the DNS habits of OpenSearch Serverless when accessed via an interface VPC endpoint (AWS PrivateLink). Understanding this foundational side may help make clear the connectivity patterns we discover on this publish.
OpenSearch Serverless interface VPC endpoint DNS decision
When creating an OpenSearch Serverless interface VPC endpoint, the service routinely provisions three non-public hosted zones: one seen non-public hosted zone us-east-1.aoss.amazonaws.com
that handles area decision for the OpenSearch Serverless assortment and dashboard, one other seen non-public hosted zone us-east-1.opensearch.amazonaws.com
 that manages decision for the OpenSearch UI (OpenSearch Dashboards), and one hidden inside non-public hosted zone that manages the ultimate DNS decision to non-public IP addresses.
Our goal on this publish is to discover how the 2 non-public hosted zones for OpenSearch Serverless work collectively: the seen non-public hosted zone us-east-1.aoss.amazonaws.com
 for collections and dashboards, and the hidden non-public hosted zone for last DNS decision to non-public IP addresses. We study how these non-public hosted zones allow scalable DNS decision in each centralized and distributed architectures. The next workflow diagram reveals the DNS decision circulation for the us-east-1
AWS Area. The identical sample applies to different Areas, with the Area identifiers within the DNS information altering accordingly.
The workflow consists of the next steps:
- A person requests entry to a set URL (for instance,
abc.us-east-1.aoss.amazonaws.com
). - The DNS request is shipped to the Amazon Route 53 Resolver, which checks the seen non-public hosted zone
us-east-1.aoss.amazonaws.com
and finds a CNAME document pointing to the endpoint-specific area. - The Route 53 Resolver makes use of the hidden inside non-public hosted zone to resolve this endpoint-specific area to the VPC endpoint’s non-public IP deal with.
- Site visitors is allowed provided that it originates from the interface VPC endpoint accepted by OpenSearch Serverless community insurance policies.
Though this DNS Decision Course of offers versatile and safe non-public entry, it turns into advanced if you want connectivity from a number of VPCs, completely different AWS accounts, or on-premises networks. The next patterns deal with these challenges and description methods to simplify community entry and DNS administration for OpenSearch Serverless in such environments.
Sample 1: Centralized interface VPC endpoint for OpenSearch Serverless
This sample makes use of a centralized method the place a shared providers AWS account with a shared providers VPC hosts the OpenSearch Serverless interface VPC endpoint and OpenSearch Serverless assortment. From there, different AWS accounts with Amazon VPCs (spoke VPCs) want to have the ability to entry OpenSearch Serverless collections via this central endpoint. Organizations generally implement this setup in hub-and-spoke community designs that join their VPCs utilizing both AWS Transit Gateway or AWS Cloud WAN. The next diagram illustrates this structure.
Problem
When accessing from on-premises networks, each community entry and DNS decision for the OpenSearch Serverless interface VPC endpoint work efficiently. Nonetheless, though the endpoint is network-accessible from spoke VPCs (for instance, via Transit Gateway or AWS Cloud WAN), DNS decision from these VPCs fail.
This occurs as a result of OpenSearch Serverless creates and makes use of a non-public hosted zone us-east-1.aoss.amazonaws.com
that’s solely related to the VPC containing the endpoint, on this case, the Shared Companies VPC. Merely sharing this non-public hosted zone with the spoke VPCs doesn’t resolve the issue, as a result of the wildcard CNAME document references a DNS title privatelink.c0X.sgw.iad.prod.aoss.searchservices.aws.dev
. This DNS title can’t be resolved from different VPCs with out extra configuration, as a result of it belongs to a non-public hosted zone privatelink.c0X.sgw.iad.prod.aoss.searchservices.aws.dev
 that’s solely related to the shared providers VPC. This non-public hosted zone isn’t seen in your account and is managed by AWS.
Resolution: Use Amazon Route 53 Profiles for cross-VPC DNS decision
To allow centralized DNS decision, you need to use Amazon Route 53 Profiles. With Route 53 Profiles, you may handle and apply DNS-related Amazon Route 53 configurations throughout a number of VPCs and AWS accounts. The next diagram illustrates the answer structure.
The answer consists of the next steps:
- Create an OpenSearch Serverless interface VPC endpoint within the shared providers VPC. This routinely creates and associates the next:
-
- Two default non-public hosted zones.
- One hidden non-public hosted zone with this VPC.
-
- Create a Route 53 Profile within the shared providers account.
- Affiliate the interface VPC endpoint for OpenSearch Serverless with the Route 53 Profile.
- The Route 53 Profile routinely associates the hidden non-public hosted zone with the profile.
- Affiliate the non-public hosted zone
us-east-1.aoss.amazonaws.com
 that was routinely created by OpenSearch Serverless with the Route 53 Profile. - Share the Route 53 Profile together with your different AWS accounts in your group utilizing AWS Useful resource Entry Supervisor (AWS RAM).
- Affiliate the spoke VPCs (situated in numerous accounts) with the Route 53 Profile.
When you’ve got an current Route 53 Profile in your shared providers account that’s already related to spoke VPCs, you may merely affiliate the OpenSearch Serverless interface VPC endpoint and the non-public hosted zone us-east-1.aoss.amazonaws.com
 to this profile.
After finishing these steps, the DNS decision for the OpenSearch Serverless assortment and dashboard endpoints works seamlessly from spoke VPCs related to the Route 53 Profile. Shoppers in spoke VPCs can resolve and entry OpenSearch Serverless collections and dashboards via the centralized VPC endpoint.
Sample 2: Distributed interface VPC endpoint for OpenSearch Serverless
Every spoke VPC, residing in its respective AWS account, hosts its personal OpenSearch Serverless assortment and interface VPC endpoint. We now need to obtain the next:
- Centralize DNS administration in a shared providers VPC to supply constant decision for OpenSearch Serverless collections deployed throughout a number of spoke accounts
- Present on-premises sources with DNS decision functionality for all OpenSearch Serverless collections throughout the group via a Route 53 Resolver inbound endpoint within the shared providers VPC
The next diagram illustrates this structure.
Problem
Managing DNS decision for OpenSearch Serverless collections and dashboards turns into advanced on this distributed mannequin as a result of every interface VPC endpoint creates its personal set of personal hosted zones which are solely related to their respective VPCs. This creates a fragmented DNS panorama the place the shared providers VPC and on-premises networks want a consolidated strategy to resolve domains of OpenSearch Serverless collections and dashboards throughout a number of spoke accounts.
Resolution: Use a self-managed non-public hosted zone within the shared providers VPC for on-prem DNS decision
To allow centralized DNS decision for distributed endpoints, create a self-managed non-public hosted zone within the shared providers account and affiliate it with the shared providers VPC. Inside this non-public hosted zone, you may create CNAME information that map every OpenSearch Serverless assortment endpoint to its respective interface VPC endpoint DNS names within the spoke accounts. The next diagram illustrates this structure.
Implementation consists of the next steps:
- Create a self-managed non-public hosted zone within the shared providers account with the area title
us-east-1.aoss.amazonaws.com
 and affiliate it with the shared providers VPC. For every OpenSearch Serverless assortment, create a CNAME document that factors to the Regional DNS title of its corresponding interface VPC endpoint.
This configuration permits each on-premises sources and sources within the shared providers VPC to resolve OpenSearch Serverless endpoints which are within the spoke accounts.
After you full these steps, every OpenSearch Serverless interface VPC endpoint stays inside its unique AWS account, sustaining safety boundaries and account-level autonomy. On-premises techniques can entry OpenSearch Serverless collections and dashboards utilizing unique assortment DNS names (for instance, {collection-name}.us-east-1.aoss.amazonaws.com
) via DNS decision supplied by the non-public hosted zone within the shared providers VPC.
Conclusion
As organizations scale their adoption of OpenSearch Serverless, establishing safe and centralized community entry turns into more and more necessary. On this publish, we explored two architectural patterns particularly round DNS administration:
- Centralized endpoint mannequin – This sample is right when a shared providers account manages the OpenSearch Serverless interface VPC endpoints, permitting a number of spoke accounts to entry OpenSearch Serverless collections and dashboards via a centralized set of community sources.
- Distributed endpoint mannequin with centralized DNS – This sample is appropriate for organizations that require account-level autonomy, the place every AWS account manages its personal OpenSearch Serverless interface VPC endpoints, whereas DNS decision is centralized via a shared self-managed non-public hosted zone in a shared providers account.
By understanding the DNS structure of OpenSearch Serverless and utilizing providers like Route 53 Profiles and AWS RAM, organizations can construct safe and strong entry patterns that align with their organizational construction and desires.
In regards to the Authors
Ankush Goyal is a Enterprise Help Lead in AWS Enterprise Help who helps prospects streamline their cloud operations on AWS. He’s a results-driven IT skilled with over 20 years of expertise.
Anvesh Koganti is a Options Architect at AWS specializing in Networking. He focuses on serving to prospects construct networking architectures for extremely scalable and resilient AWS environments. Outdoors of labor, Anvesh is enthusiastic about client expertise and enjoys listening to podcasts on tech and enterprise. When disconnecting from the digital world, Anvesh spends time open air mountaineering and biking.
Salman Ahmed is a Senior Technical Account Supervisor in AWS Enterprise Help. He focuses on guiding prospects via the design, implementation, and help of AWS options. Combining his networking experience with a drive to discover new applied sciences, he helps organizations efficiently navigate their cloud journey. Outdoors of labor, he enjoys images, touring, and watching his favourite sports activities groups.