在DAs VPC中将DAX连接到lamda功能

时间:2017-07-18 06:55:19

标签: java amazon-web-services amazon-dynamodb amazon-dynamodb-dax

连接时无法连接来自lamda函数的DAX api调用获取错误。

TART RequestId: 91744a72-6b81-11e7-b7b9-81ab3e1f67f1 Version: $LATEST
[2017-07-18 06:23:09.356] NO-REQUEST-ID ERROR c.a.d.c.SocketTubePool - error connecting to /172.31.20.237:8111 java.net.ConnectException: Connection timed out (Connection timed out)
[2017-07-18 06:23:09.356] NO-REQUEST-ID ERROR c.a.d.c.SocketTubePool - error connecting to /172.31.20.237:8111 java.net.ConnectException: Connection timed out (Connection timed out)
[2017-07-18 06:23:09.364] NO-REQUEST-ID ERROR c.a.d.c.SocketTubePool - error connecting to /172.31.20.237:8111 java.net.ConnectException: Connection timed out (Connection timed out)
[2017-07-18 06:23:09.364] NO-REQUEST-ID ERROR c.a.d.c.c.Cluster - caught exception during cluster refresh: java.io.IOException: failed to configure cluster endpoints from hosts: [dax122.fwef.clusefwefwetercfg.dax.use1.cache.amazonaws.com:8111]
java.io.IOException: failed to configure cluster endpoints from hosts: [dax122.fwef.clusefwefwetercfg.dax.use1.cache.amazonaws.com:8111]

2 个答案:

答案 0 :(得分:3)

您可以检查用于启动DAX群集的安全组的安全组配置吗?您需要使用用于lambda函数配置的安全组作为源,在用于启动集群的安全组上的TCP端口8111上授权入站流量。有关更多帮助,请参阅documentation

答案 1 :(得分:1)

这是连接超时异常。如果在入站规则中打开了端口8111,则应检查AWS防火墙设置。

这些设置位于安全策略部分的AWS仪表板上。