Coder Social home page Coder Social logo

Reading an iceberg table in a vpc fails with connection time out on endpoint URL: "https://sts.amazonaws.com/" about aws-sdk-pandas HOT 3 OPEN

AdrianoNicolucci avatar AdrianoNicolucci commented on May 27, 2024
Reading an iceberg table in a vpc fails with connection time out on endpoint URL: "https://sts.amazonaws.com/"

from aws-sdk-pandas.

Comments (3)

kukushking avatar kukushking commented on May 27, 2024

Hi @AdrianoNicolucci , does it succeed with a vanilla boto3 call and not with aws sdk for pandas? is athena endpoint also set?

from aws-sdk-pandas.

AdrianoNicolucci avatar AdrianoNicolucci commented on May 27, 2024

Hi @AdrianoNicolucci , does it succeed with a vanilla boto3 call and not with aws sdk for pandas? is athena endpoint also set?

@kukushking After testing it with a table that is just a csv table instead, I'm still getting the same issue of the lambda function timing out since it can't connect to athena. So perhaps it has nothing to do with the iceberg table specifically. However, When I attempt to query directly with boto3, I can see the query reach the athena service which tells me there is an issue somewhere with this method.

from aws-sdk-pandas.

AdrianoNicolucci avatar AdrianoNicolucci commented on May 27, 2024

After reviewing the logs and doing some further debugging, it looks like the read_sql_query method is trying to call the sts service to get the account_id, using the global instead of the regional endpoint. I'm confused why it's trying to use the global sts endpoint instead of the regional one.

error message

 File "/opt/python/awswrangler/sts.py", line 33, in get_account_id
    return _utils.client(service_name="sts", session=boto3_session).get_caller_identity()["Account"]

Here are the global endpoint configurations I have tried to set to force it to use the region endpoints but with no luck:

os.environ["AWS_STS_REGIONAL_ENDPOINTS"] = "regional"
wr.config.glue_endpoint_url = "https://glue.us-east-2.amazonaws.com"
wr.config.athena_endpoint_url = "https://athena.us-east-2.api.aws.com"
wr.config.sts_endpoint_url = "https://sts.us-east-2.amazonaws.com" 

from aws-sdk-pandas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.