Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connection Error while calling external api from AWS Glue

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!

like image 468
Akhil Avatar asked Sep 13 '25 23:09

Akhil


1 Answers

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.

like image 61
pdangelo4 Avatar answered Sep 16 '25 13:09

pdangelo4