Amazon redshift aws datapipeline-psycopg2.OperationalError:无法连接到服务器:连接超时

Amazon redshift aws datapipeline-psycopg2.OperationalError:无法连接到服务器:连接超时,amazon-redshift,subnet,amazon-data-pipeline,Amazon Redshift,Subnet,Amazon Data Pipeline,我正在尝试使用python脚本通过数据管道shellcommand活动将数据从redshift加载到dynamodb。 主机名和端口详细信息在脚本中硬编码。 当我尝试运行Datapipeline作业时,会出现问题。我收到以下错误: psycopg2.OperationalError: could not connect to server: Connection timed out Is the server running on host "1*.***.**.*" and accepting

我正在尝试使用python脚本通过数据管道shellcommand活动将数据从redshift加载到dynamodb。 主机名和端口详细信息在脚本中硬编码。 当我尝试运行Datapipeline作业时,会出现问题。我收到以下错误:

psycopg2.OperationalError: could not connect to server: Connection timed out
Is the server running on host "1*.***.**.*" and accepting
TCP/IP connections on port 5***?
我知道ec2实例无法访问红移,因此出现了这个问题。所以我将为redshift集群创建的子网Id和安全组作为参数传递给要创建的EC2实例。但是现在我看到我的shellcommand活动“waiting_for_runner”状态,尽管ec2实例处于活动状态并正在运行

有没有人遇到过类似的问题并解决了?
如有任何建议,将不胜感激

解决了问题,解决了问题。子网Id没有在入站规则中维护红移群集的IPV4 CIDR。