question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS Glue API calls are hanging when used from the context of an AWS Glue job

See original GitHub issue

I’m trying to read the list of tables from a data catalog in AWS Glue from within a Glue job with the following code:

session = boto3.Session(region_name='us-east-2')
glue = session.client('glue')
tables = glue.get_tables(
    DatabaseName='customer1'
)
print tables

The result is that the job hangs for 15 minutes and fails with the following error message:

botocore.vendored.requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host=‘glue.us-east-2.amazonaws.com’, port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(, 'Connection to glue.us-east-2.amazonaws.com timed out. (connect timeout=60)’))

I can use the S3 API just fine so the problem is specific to the Glue API.

I’ve gone through all my security groups and opened up all the ports to traffic from anywhere. I’ve even added self-referencing rules. But this is to no avail.

I can’t figure out what could be causing the connection to be blocked. Is AWS specifically blocking glue requests?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rogsmithcommented, Jun 18, 2018

+1

0reactions
botchniaquecommented, Jul 6, 2018

I had this problem and fixed it by provisioning my dev-endpoint in an internal subnet https://stackoverflow.com/a/51210082/1680826

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS Glue job hangs when calling the AWS Glue client API ...
I fixed it by changing the subnet-id when creating the dev-endpoint. Initially I was using a subnet that routed traffic to an Internet...
Read more >
Troubleshooting errors in AWS Glue
If AWS Glue returns a resource unavailable message, you can view error messages or logs to help you learn more about the issue....
Read more >
Troubleshoot AWS Glue job running for a long time
AWS Glue provides Amazon CloudWatch metrics that can be used to provide information about the executors and the amount of done by each...
Read more >
Calling AWS Glue APIs in Python
The following example shows how call the AWS Glue APIs using Python, to create and run an ETL job. To create and run...
Read more >
AWS Glue job run statuses
You can view the status of an AWS Glue extract, transform, and load (ETL) job while it is running or after it has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found