I am trying to access elastic search from my mongo triggers, I want to sync my mongo data to elastic search. The elastic search instance is hosted in the vpc peered with the one of atlas. When I try to do this, I gave internal ip of elastic search from my vpc.
when testing that trigger, its giving me this error:
FunctionError: restricted host specified
Hi @Ankit_Paudel1 ,
The Triggers and their related Functions run connecting to your Cluster, not on your Cluster, thus know nothing about the VPC you may have set there.
There’s a VPC Feature for App Services (of which Triggers are a part), but only allow incoming connections. As documented in the limitations:
- All outbound requests, such as an App Services trigger calling an external API, go over the public internet.