从AWS Glue调用外部api时出现连接错误

问题描述 投票:1回答:1

我正在尝试从aws胶脚本访问外部api。

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

我收到连接错误说明,

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',))

有人可以帮忙吗?预先感谢!

amazon-web-services aws-glue urllib3
1个回答
0
投票

[不确定是否已回答该问题,但是转到“编辑作业”并删除所需的连接(如果有)。当您具有所需的连接时,它将使您保持在VPC内,不允许进行外部连接。

© www.soinside.com 2019 - 2024. All rights reserved.