Question: We have around 50 AWS accounts and each account is connect to ON premise , Data centers , some other AWS Accounts.

Sometimes due to misconfig , the connectivity gets lost and then developers tell us later on.

I want o build monitoring solution where i have something running in each subnet in each account which can ping the ips in other account and then publish metric in single AWS account so i can plot it.

Inintially i was thinking of using Lamda and all was ok untill i found that i can't use PING in Lambda and that blow away my solution.

I really dont want to create unnecessary resources. Is there any better way to do it?

Answer: 
Please check **AWS Organizations**, <https://aws.amazon.com/blogs/security/announcing-aws-organizations-centrally-manage-multiple-aws-accounts/> 

Other way could be using cloud watch on all account(or centrally) with lambda.
There are two tools which I believe can fit in this scenario but you will have to install their agents on nodes. 

* Monit - It can monitor network and trigger based on any malfunction.
* Zabbix - An enterprise level monitoring tool

I have been using both Monit and Zabbix for our servers (both local data center and AWS) in different combination.