AWS Elasticsearch VPC connectivity

0 votes

I've created an Elasticsearch domain in AWS.

It's added to my VPC inside a public subnet and I've attached a security group which is currently completely open.

I have this policy attached also:

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

I am trying to access an endpoint locally but it doesn't seem to be allowed.

The Kibana URL for example is:

https://vpc-bla.bla.bla.eu-central-1.es.amazonaws.com/_plugin/kibana/

Any idea why I'm not able to access this URL?

Sep 4, 2018 in AWS by bug_seeker
• 15,350 points
480 views

1 answer to this question.

0 votes
VPC Endpoint cannot be accessed outside the subnets that you associated with the elastic-search domain.

you can try performing curl from any EC2 instances that is part of the same subnet that you associated with elastic-search, it should work.

If you need to access the endpoint from internet, then don't create VPC endpoint elastic-search instead create elastic-search domain with internet access. You can specify whether you want VPC or internet accessible cluster when creating the ES domain.
answered Sep 4, 2018 by Priyaj
• 56,520 points
Hi Priyaj, That's a great information. Just to understand more, is it possible to access the elastic search domain within VPC ?

Yes @Gopinaath, it's possible to access the elastic search domain within your VPC. Have a look at these documentations: https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html

Related Questions In AWS

+5 votes
13 answers

AWS VPC - What is the difference between Internet Gateway & NAT

Internet Gateway An Internet Gateway is a logical connection ...READ MORE

answered Apr 24, 2018 in AWS by Flying geek
• 3,150 points
8,304 views
0 votes
1 answer

how to access AWS S3 from Lambda in VPC

With boto3, the S3 urls are virtual by default, ...READ MORE

answered Sep 28, 2018 in AWS by Priyaj
• 56,520 points
1,484 views
0 votes
1 answer

Is there a way to move AWS Elasticsearch to another account

Create a role with Elasticsearch permission. Provide the iam:PassRole for ...READ MORE

answered Oct 30, 2018 in AWS by Priyaj
• 56,520 points
45 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

AWS ElasticSearch with cakephp/elastic-search plugin

CakePHP is an open source, MVC framework ...READ MORE

answered Jul 30, 2018 in AWS by Priyaj
• 56,520 points
133 views