lambda function always timing out when connecting to AWS Elasticsearch

0

I have created an elastic search domain VPC mode and put the lambda function in the same VPC and even the same subnet along with the same security group with free access in all ports.
I have given all the permissions like : AWSLambdaVPCAccessExecutionRole,elasticSearchPolicyinline Policy ,CloudWatchLogsFullAccess,AWSLambdaBasicExecutionRole but my lambda function is still timing out for a single document 60 seconds timeout. Do anybody know how to correct this?

Edited by: sagarRsys on Nov 26, 2019 6:27 AM

質問済み 4年前1827ビュー
1回答
0

The thing was error wasn't actualy in Elasticsearch part. My s3 access code and elasticsearch access code were tied up. Initially, s3 part was running fine due to lambda having default access to internet. However when i introduced elasticsearch, i put my lambda in vpc. During this time, I forgot that s3 code lost access to s3 storage. So when i ran the code and it was timing out, I assumed it was due to Elasticsearch. After hours of digging, I realized my error. The solution was to create Vpc endpoint for s3 service in that region and put it in the route table. elasticsearch was running fine.

回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ