Reputation: 55
I am trying to run a lambda function written in Go using AWS sam local invoke, but cannot connect to the dynamodb running in the cloud.
I've tried tunneling and portforwarding to the database in Putty. Specifying the host and port to my own ip and port.
The command I use to run the lambda: sam local invoke -t ./qa.yaml -e ./s3_event.json
I expect that it should run the lambda, but it gives this connection error:
tcp 192.168.x.xxx:5433: connect: connection refused","data":{"database":"analytics"}}
Upvotes: 0
Views: 1819
Reputation: 55
The problem was using 127.0.0.1 as my host. I had to switch it to host.docker.internal.
Upvotes: 1