Elasticsearch in a custom VPC

218 views Asked by At

I'm new to the AWS-VPC I've created some AWS-Lambda functions, which access AWS-Elasticsearch. now I want to Place the Elasticsearch inside a VPC. What are the best methods to do that? Should I need to create a new VPC or use the default VPC and then create a private subnet?

Lambda functions that I've created also access several other AWS resources(SQS, SNS, Cognito, etc.). So How do I configure Elasticsearch? Also For creating a subnet we choose a set of IP addresses (CIDR). How do I know the amount of IP addresses I've to choose. What does that actually mean?

I've read about VPC to VPC NAT, What are the steps I should take care of? How do I configure Lambda and Elasticsearch?

Thanks you

1

There are 1 answers

2
Binh Nguyen On

There are so many small questions in this, for VPC/Subnets/CIDR, you can quickly use and test based on the default VPC. For further VPC/Subnets/CIDR customization, you better go through some guides or some learning courses.

For Lambda access to ES domains, you need to ensure:

  • Lambda is required to be placed under a VPC.
  • ES domain is required to be placed under a VPC.
  • Allow ES domain access with Lambda security group.

This is for network connection prerequisites, for ES domain requests, you better check your ES domain setup and Lambda code.