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"}}