0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VPC アクセスで作成したAmazon Open Search ServeceのDashBoardsにプロキシサーバ経由でアクセスする

Last updated at Posted at 2022-01-21

ネットワーク「VPC アクセス」で作成したAmazon Open Search ServeceのDashBoardsへはプロキシを経由しないとアクセスができません。
Amazon Cognito 認証の設定等を使わずにシンプルにEC2で作成したプロキシサーバーを経由してDashBoardsに接続する手順をメモしておきます

手順

前提として今回はプロキシサーバにはnginxを使用。またAmazonLinux2でECインスタンスを作成しています。

1 ) プロキシサーバ用のEC2インスタンスをOpen Searchと同じVPCに作成する。
今回はAmazonLinux2で作成します。Elastic IPを設定しておいた方が便利です。
2 ) EC2、Open Seach Serviceのセキュリティグループ、アクセスポリシーを適切に設定する。
3 ) EC2にnginxをinstall

sudo amazon-linux-extras -y install nginx
  1. nginx.confを編集
    以下のように、/etc/nginx/nginx.confにOpenSeachの「ドメインエンドポイント(VPC)」を設定します。
    もし追記する場所が見当たらない場合はまるっと追記すればOKです。
/etc/nginx/nginx.conf
        include /etc/nginx/default.d/*.conf;
        location / {
            proxy_pass https://xxxxxxxxxxxxxx.amazonaws.com/;
        }
  1. nginxを起動する
sudo systemctl start nginx
sudo systemctl enable nginx
  1. DashBoardsにアクセス
    http://xx.xxx.xxx.x/_dashboards/
    ※今回作成したEC2(プロキシサーバ)のパブリックIP、あるいはElastic IPを入力してください。
    もし接続できない場合はEC2、OpenSeachのセキュリティグループ、アクセスポリシー設定に誤りがある可能性が高いです。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?