How to access Kibana from Amazon elasticsearch service?

前端 未结 5 1489
情深已故
情深已故 2020-12-13 08:38

I created Amazon elasticsearch service and populated data into it using logstash, which has been installed on an EC2 instance. On the Amazon elasticservice console page, the

5条回答
  •  Happy的楠姐
    2020-12-13 09:29

    I used for that purpose proxy tool called aws-es-kibana. It signs all your requests sent to aws kibana.

    IAM configuration:

    I created new IAM user "elasticsearch_user" with programmatic access (and I got accessKeyId and secretAccessKey associated with that account).

    Elasticsearch configuration:

    I created elasticsearch policy that enables access for the new created IAM user:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "AWS": [
              "arn:aws:iam::{YOUR_AWS_ACCOUNT_ID}:user/elasticsearch_user"
            ]
          },
          "Action": "es:*",
          "Resource": "arn:aws:es:eu-central-1:{YOUR_AWS_ACCOUNT_ID}:domain/{YOUR_ELASTICSEARCH_DOMAIN}/*"
        }
      ]
    }
    

    Connect to kibana from your local station:

    To connect from my local station (windows) to kibana I just need to type in console:

    SET AWS_ACCESS_KEY_ID=myAccessKeyId
    SET AWS_SECRET_ACCESS_KEY=mySecretAccessKey
    
    aws-es-kibana search-{PROTECTED_PART_OF_YOUR_ELASTICSEARCH_ENDPOINT}.eu-central-1.es.amazonaws.com
    

    After that you should have proxied access to your kibana under: http://127.0.0.1:9200/_plugin/kibana

提交回复
热议问题