[英]AWS Athena Federated Query - GENERIC_USER_ERROR when running DB query for PostgreSQL
I am trying to execute queries on a postgresql database I created in AWS.我正在尝试对我在 AWS 中创建的 postgresql 数据库执行查询。
I added a data source to Athena, I created the data source for postgresql and I created the lambda function.我向 Athena 添加了一个数据源,为 postgresql 创建了数据源,并创建了 lambda 函数。
In Lambda function I set:在我设置的 Lambda 函数中:
After adding this new env variable I am able to see the database in Athena but when I try to execute any query on this database as:添加这个新的环境变量后,我可以在 Athena 中看到数据库,但是当我尝试对该数据库执行任何查询时:
GENERIC_USER_ERROR: Encountered an exception[com.amazonaws.SdkClientException] from your LambdaFunction[arn:aws:lambda:eu-central-1:449809321626:function:data-production-athena-connector-nina-lambda] executed in context[retrieving meta-data] with message[Unable to execute HTTP request: Connect to s3.eu-central-1.amazonaws.com:443 [s3.eu-central-1.amazonaws.com/52.219.170.25] failed: connect timed out]
This query ran against the "public" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 3366bd80-143e-459c-a4da-5350b5ab4a77
I receive this error after running query:运行查询后我收到此错误:
GENERIC_USER_ERROR: Encountered an exception[com.amazonaws.SdkClientException] from your LambdaFunction[arn:aws:lambda:eu-central-1:449809321626:function:data-production-athena-connector-nina-lambda] executed in context[retrieving meta-data] with message[Unable to execute HTTP request: Connect to s3.eu-central-1.amazonaws.com:443 [s3.eu-central-1.amazonaws.com/52.219.170.25] failed: connect timed out] This query ran against the "public" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 3366bd80-143e-459c-a4da-5350b5ab4a77
What could be causing the problem?是什么导致了这个问题?
Thanks a lot!非常感谢!
Root Cause:根本原因:
VPC have no internet connection issue, causing Lambda can't access S3. VPC 没有互联网连接问题,导致 Lambda 无法访问 S3。
Solution:解决方案:
Add VPC Gateway Endpoint (Select com.amazonaws.eu-central-1.s3 ) in Lambda associated VPC.在 Lambda 关联的 VPC 中添加 VPC 网关终端节点(选择com.amazonaws.eu-central-1.s3 )。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.