![](/img/trans.png)
[英]Aws Wrangler giving not implemented error: impossible to query aws athena
[英]AWS Athena Federated Query - GENERIC_USER_ERROR when running DB query for PostgreSQL
我正在嘗試對我在 AWS 中創建的 postgresql 數據庫執行查詢。
我向 Athena 添加了一個數據源,為 postgresql 創建了數據源,並創建了 lambda 函數。
在我設置的 Lambda 函數中:
添加這個新的環境變量后,我可以在 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
運行查詢后我收到此錯誤:
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
是什么導致了這個問題?
非常感謝!
根本原因:
VPC 沒有互聯網連接問題,導致 Lambda 無法訪問 S3。
解決方案:
在 Lambda 關聯的 VPC 中添加 VPC 網關終端節點(選擇com.amazonaws.eu-central-1.s3 )。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.