首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当使用awswrangler连接到Redshift时,Redshift集群必须公开访问吗?

当使用awswrangler连接到Redshift时,Redshift集群必须公开访问吗?
EN

Stack Overflow用户
提问于 2022-07-29 17:53:12
回答 1查看 198关注 0票数 0

我在与Redshift集群相同的AWS帐户中的lambda上运行awswrangler.redshift.connect_temp。当红移群集未设置为public时,我在运行connect_temp时会得到连接超时错误。

代码语言:javascript
复制
[ERROR] InterfaceError: ('communication error', TimeoutError(110, 'Connection timed out'))
Traceback (most recent call last):
  File "/var/task/redshift_import_lambda.py", line 12, in handler
    with wr.redshift.connect_temp(
  File "/opt/python/awswrangler/redshift.py", line 582, in connect_temp
    return redshift_connector.connect(
  File "/opt/python/redshift_connector/__init__.py", line 365, in connect
    return Connection(
  File "/opt/python/redshift_connector/core.py", line 619, in __init__
    raise InterfaceError("communication error", e)

如果我将集群设置为公共的,那么连接就可以了。

红移集群必须是公共的才能让awswrangler连接吗?

在使AWSWrangler连接正常工作时,是否有一种方法将集群设置为非公共的(出于安全原因)?

EN

回答 1

Stack Overflow用户

发布于 2022-07-29 23:07:37

您必须将lambda函数放在中,与红移集群相同。这样,您的lambda应该能够连接到RedShift,而不需要它是公开的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73169278

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档