I'm trying to understand how to connect to my OpenSearch Serverless instance using Bastion EC2 instance. I have a VPC Endpoint connected to my OpenSearch instance, and I want to connect to that instance from my local machine using a Bastion host.
Thanks!
I couldn't reach the solution, but I can give you the steps I followed to see if you can get the issue solved.
First, I created a connection to the Bastion host using paramiko:
Once you're able to connect with your bastion what I did is to create a tunnel from my local machine to the actual OpenSearch host.
Now it's supposed that I've enabled this tunnel between my computer and opensearch, and if I call to my localhost:10000 then I'll be accessing to my OpenSearch.
Then finally you can do a ping to your opensearch_client to see if it's working
Hope this solution works fine for you :D or at least gives you a thought.