how to connect to multichain from aws lambda

0 votes
hi,

i've been trying to make json-rpc calls from an aws lambda microservice.  these have been timing out, i assume it's because there is no (lambda) i.p address to add to our firewall rules or the chain conf file.

is there a workaround available?

thanks,

santosh
asked Nov 8, 2015 by santosh

1 Answer

0 votes
 
Best answer

Your firewall configuration is outside the scope of what we can help with, but you can set MultiChain to allow incoming JSON-RPC connections from a wide range of IP addresses using the rpcallowip parameter in the runtime parameters for your chain.

You can have as many rpcallowip lines as you want, using one of these standard forms (fixed IP, mask, CIDR notation).

rpcallowip=10.1.1.34
rpcallowip=192.168.1.0/255.255.255.0
rpcallowip=172.16.0.0/24 

I found some information about the AWS IP addresses used here:

https://aws.amazon.com/blogs/aws/aws-ip-ranges-json/

Of course, this will not be particularly secure, because loads of people use AWS, and your MultiChain instance will only be protected by the password. But maybe that's OK for your use case.

answered Nov 8, 2015 by MultiChain
selected Nov 9, 2015 by santosh
i've updated the rpcallowip parameter; using individual entries at first and  eventually the entire list below with no joy connecting to my chain.  are there any other troubleshooting hints or docs that i should consider?


rpcallowip=54.220.0.0/16
rpcallowip=54.216.0.0/15
rpcallowip=54.78.0.0/16
rpcallowip=52.95.61.0/24
rpcallowip=54.239.100.0/23
rpcallowip=46.137.128.0/18
rpcallowip=52.30.0.0/15
rpcallowip=54.228.16.0/26
rpcallowip=176.34.159.192/26
rpcallowip=54.76.0.0/15
rpcallowip=54.240.220.0/22
rpcallowip=178.236.0.0/20
rpcallowip=54.72.0.0/15
rpcallowip=54.246.0.0/16
rpcallowip=54.229.0.0/16
rpcallowip=176.34.64.0/18
rpcallowip=52.95.244.0/24
rpcallowip=52.92.40.0/21
rpcallowip=54.170.0.0/15
rpcallowip=52.95.60.0/24
rpcallowip=54.154.0.0/16
rpcallowip=54.228.0.0/16
rpcallowip=52.48.0.0/14
rpcallowip=46.51.192.0/20
rpcallowip=54.194.0.0/15
rpcallowip=54.231.128.0/19
rpcallowip=46.137.0.0/17
rpcallowip=54.247.0.0/16
rpcallowip=52.95.255.64/28
rpcallowip=52.94.5.0/24
rpcallowip=176.32.104.0/21
rpcallowip=52.18.0.0/15
rpcallowip=79.125.0.0/17
rpcallowip=54.240.197.0/24
rpcallowip=87.238.80.0/21
rpcallowip=54.155.0.0/16
rpcallowip=185.48.120.0/22
rpcallowip=54.239.99.0/24
rpcallowip=176.34.128.0/17
rpcallowip=52.16.0.0/15
rpcallowip=46.51.128.0/18
rpcallowip=54.74.0.0/15
rpcallowip=54.239.32.0/21
rpcallowip=54.239.114.0/24
You can try a simple telnet first, to the right port, to see if the connection to MultiChain is possible. Also check the IP address of the requesting machine by using one of the services listed here: http://stackoverflow.com/questions/3097589/getting-my-public-ip-via-api and see if it fits the above masks.
...