We have configured mongo atlas archiving and trying to connect with aws ec2 with the help of VPC peering. We have already established vpc peering to connect Primary database and it is working fine. But in case of archive db connection we are having connection issue, if we try with ip whitelist then it works fine.
Can any one help us to connect mongo archive db with vpc peering.
Error while connecting with mongo shell
2020-12-12T05:41:15.283+0000 W NETWORK [thread1] Failed to connect to xx.xxx.xx.xx:port after 5000ms milliseconds, giving up. 2020-12-12T05:41:15.283+0000 E QUERY [thread1] Error: couldn't connect to server atlas-online-archive-5da8542bcf09a2545f54fa24-jsraa.a.query.mongodb.net:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:275:13 @(connect):1:6 exception: connect failed