Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upConnecting to Athena throws error: Could not connect to the endpoint URL: "https://sts.c.amazonaws.com/" #110
Comments
|
This is strange as no change has been pushed to the cran yet. Are you able to make the connection to STS with python boto3?
|
|
Yes with reticulate I am able to do:
It returns an object. Is that what you asked for? |
|
I am not a 100% sure, library(RAthena)
assume_role(role_arn = 'role:arn') |
|
Just ran my unit test for role_arn: https://github.com/DyfanJones/RAthena/blob/master/tests/testthat/test-arn.R Everything seems fine. Has there been any changes to your aws role in the last few days that could explain why you are getting this error? |
|
Hi nothing changed in the role. Just checked that. |
|
That function is a basic wrapper of: library(reticulate)
boto <- import("boto3")
sts <- boto$Session()$client("sts")
response <- sts$assume_role(RoleArn = "role_arn",
RoleSessionName = sprintf("RAthena-session-%s", as.integer(Sys.time())),
DurationSeconds = 3600L)I am guessing |
|
I think I solved it. I recently started to use your package and forgot that I read that we should use the regions to make assume role work well. Went to my history of terminal commands and saw the difference. Sorry for steeling your time but maybe it helps others in future. Solution: use or library(RAthena)
library(DBI)
con <- RAthena::dbConnect(RAthena::athena(),s3_staging_dir = 's3://bucketnamepath',role_arn = 'role:arn', region_name = 'eu-central-1')unfortunately dbConnect does not suggest many parameter options in RStudio as suggestions or in terminal explanations. Thanks for your help! |
|
Perfect i am glad it is working :) i have some documentation around the new parameters and methods. i havent added region_name it as a requirement as region can be set in the config file. However i could add a note to make sure users are aware |
|
@NanisTe I will added a catch to ensure users are aware that
|
Issue Description
dbConnect()returnsError: Could not connect to the endpoint URL: "https://sts.c.amazonaws.com/"nslookup and ping on this URL do not work as well.
R runs on an instance in AWS. Everything worked two to five days ago.
nslookup and ping on https://sts.amazonaws.com work though.
Meaning my instance is connected.
Reproducible Example
Sorry not possible to support you with an reproducible example
Example:
Session Info