Athena federated query on PostgresSQL

1

Hi I am trying to execute queries on a postgresql database I created in AWS. I added a data source to Athena, I created the data source for postgresql and I created the lambda function. In lambda function I set:

  • default connection string
  • spill_bucket and spill prefix (I set the same for both: 'athena-spill'. In the S3 page I cannot see any athena-spill bucket)
  • the security group --> I set the security group I created to access the db
  • the subnet --> I set one of the database subnet I deployed the lambda function but I received an error and I had to add a new environment variable created with the connection string but named as 'dbname_connection_string'.

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:

select * from tests_summary limit 10;

I receive this error:

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!

amul
已提問 2 年前檢視次數 335 次
2 個答案
0

insert the community

已回答 2 年前
  • I cannot understand, Did I make a mistake during posting or what else?

0

how I setup account with amazon?

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南