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!