Athena Federated Query - Timing out on connect
Hello - I am accessing tables in an RDS Aurora Postgres by using an Athena Federated Query. The Lambda can access the postgres because it is reading the tables into the catalog in Athena, but when I try to query the data I get a timeout error.
GENERIC_USER_ERROR: Encountered an exception[com.amazonaws.SdkClientException] from your LambdaFunction[arn:aws:lambda:MyRegion:MyAccount:function:MyFunction] executed in context[retrieving meta-data] with message[Unable to execute HTTP request: Connect to s3.amazonaws.com:443 [s3.amazonaws.com/18.104.22.168] failed: connect timed out]
This seems to be related to the s3 permissions, but I can't suss out where the mismatch is. Do I need a bucket policy? As a principal, I have access to all the s3 resources needed, permissions on Athena, and Lambda also. The Lambda seems to have the correct s3 permissions (read/write for the bucket and all objects in the bucket). Any insight would be helpful!
It seems Lambda currently has no internet access. This is most likely because of your VPC configuration. You can check or setup a S3 VPC endpoint and try again.
I set up an S3 VPC endpoint and did not get any change in the error. I used com.amazonaws.s3-global.accesspoint Are there specifics with the endpoint configuration I should look at?
Figured it out - You need to selected the region specific service gateway. The Endpoint I mentioned above is an interface.
After I started a new VPC Endpoint with com.amazonaws.us-east-1.s3 and associated it to my security group, a new line in my sg appeared pl-**** Then I could properly query from Athena.
Thanks for the push in the right direction!
Athena -- Query exhausted resources at this scale factorasked 3 years ago
Athena Federated Query - Timing out on connectAccepted Answerasked 5 months ago
Athena permission error running a queryasked 3 months ago
Can i execute an Athena saved query from lambda?Accepted AnswerMODERATORasked 3 years ago
Athena Query timeoutasked 8 days ago
Does Athena support query caching?asked 4 years ago
I cannot use current_date + interval in Athena boto3 query in LambdaAccepted Answerasked 3 months ago
Querying postgres RDS from Athenaasked a year ago
How to create SSL dblink connection from RDS to postgres on premise?asked 4 months ago
How to import postgresql or nosql datasets in Amazon Sagemaker?asked 6 months ago