Skip to content

AWS SAM Lambda Local Testing Connection Refused #146

Answered by asherritt
asherritt asked this question in Q&A
Discussion options

You must be logged in to vote

Admittedly my Docker skills are a bit thin so it took me a while to understand what was going on. I figured it was an ip address mapping issue between the 2 containers and that I needed to implement a host_port_remap but wasn't sure what the right settings should be.

I used docker container inspect to find the IP address and used that as the "to_host". I left out the ports in the mapping and it works!

host_port_remap=[
{
'from_host': '127.0.0.1',
'to_host': '172.27.0.2'
}
]

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by asherritt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant