python - redshift 连接的粘合作业 : "Unable to find suitable security group"

标签 python amazon-web-services jdbc amazon-redshift aws-glue

我正在尝试设置 AWS Glue 作业并连接到 Redshift。

当我将连接类型设置为 Redshift 时出现错误:

"Unable to find a suitable security group. Change connection type to JDBC and retry adding your connection."

按照所说here in these forums ,我向我的 IAM 帐户添加了角色 AWSGlueServiceRoleDefault 的权限:

enter image description here

然后我使用匹配的 IAM 角色 AWSGlueServiceRoleDefault 设置作业:

enter image description here

我需要将 Glue 数据存储在 Redshift DB 中,所以我选择了 JDBC 然后添加了一个连接:

enter image description here

我一选择 Redshift,它就提示找不到合适的安全组。这是为什么?

enter image description here

enter image description here

最佳答案

我在尝试将 Glue 与 Amazon RDS (MySQL) 连接时发现了同样的问题,并按照 AWS Glue 指南解决了该问题 -> Setting Up a VPC to Connect to JDBC Data Stores .

简而言之,您应该检查与您的 RedShift 集群关联的安全组是否允许自引用流量。

  1. 转到 RedShift 控制台并选择集群
  2. 集群属性部分查看与集群关联的安全组的 ID(例如 sg-957be3ef)。
  3. 单击安全组名称跳转到 EC2 控制台 -> 安全组部分。选择组并修改入站和出站规则,添加自引用规则以允许 AWS Glue 组件进行通信。
    • 入站规则:选择 Type=All TCP,保留默认值并在Source 字段中键入安全组(即本例中的 sg-957be3ef)。
    • 出站规则:与入站规则相同。

希望有用!

关于python - redshift 连接的粘合作业 : "Unable to find suitable security group",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46531522/

相关文章:

python - 在 OS X 后台运行 Python

sql - Amazon AWS 安全组 - 允许 Microsoft Azure Web 应用程序 IP 地址

java - 使用 hibernate 将表情符号保存到 mysql 不正确的字符串值 : '\xF0\x9F\x98\x88\xF0\x9F...' for column 'name' at row 1

java - hibernate :What makes JDBC connections expensive?

python - 如何从字符串中获取数字

python - 如何删除每列中的重复字符?

python - 无法通过 lambda 函数承担角色 - Python

amazon-web-services - 由于 AWSSamples::S3BucketEncrypt::Hook,使用加密创建 S3 存储桶失败

java - jdbc创建表时出错

python - 是否有与 VB.NET 'With' 语句等效的 Python?