3
votes

I am trying to access an external api from aws glue script.

import requests
r = requests.get("https://api.github.com/users/hadley/orgs")

I'm getting a connection error stating,

ConnectionError: HTTPSConnectionPool(host='api.github.com/users/hadley/orgs', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fb8ff471400>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

Can anyone help? Thanks in advance!

1
This is not an apache-spark question and I'm not sure I can provide an answer to your issue but what I would do is start from here. There seems work to do with the network configuration for AWS Glue in this case.eliasah
Same problem here. Have you been able to solve it?0x4a6f4672

1 Answers

0
votes

Not sure if this has been answered yet but go to "Edit job" and remove your required connection if you have one. When you have a required connection it keeps you within your VPC not allowing for external connections.