Search code examples
amazon-web-servicesamazon-opensearch

Is it possible to port-forward Opensearch cluster deployed on AWS to local


I am new to AWS and trying to find a way with which i can port-forward a opensearch cluster deployed on AWS. Looking at aws opensearch help i am not able to find any command that can do port-forwarding. Is there anyway to port-forward without ssh tunneling ?


Solution

  • If I understand correctly you want to access Opensearch globally but right now it accessible only inside VPC

    Here is at least three possible solutions:

    1. Simple: Create Public Access Opensearch instance. This will allow yo to connect via internet directly. enter image description here
    2. Little bit harder: If Opensearch instance is already created with VPC access and you only able to use it as is, you can use ALB to forward requests from loadbalancer globally accessible URL to Opensearch internal URL. You have to set local Opensearch local IP as target for loadbalancer target group. Here is some info how to do it (sorry for Japanese, but I didn't find relevant information in English)
    3. More harder: You can create EC2 machine and forward ports from EC2 global IP to Opensearch internal URL by using Linux tools. Here is million ways how to do it from SSH port forwarding to Proxy servers