I have a scenario in which some HTTP service is deployed on AWS instance and I want to access this privately in my Google cloud function. What I have tested so far that using a VPN Gateway I can connect both google and AWS compute instance. BUT now I am looking for how it can be possible while using Google functions which are not under any VPC to access the service over VPN gateway. Is there any way I can assign my google cloud function to the VPC through which I can call AWS service over VPN Gateway?
Asked
Active
Viewed 1,022 times
0

user565
- 871
- 1
- 22
- 47
-
The correct answer depends on the VPN that you are using in your Google Cloud VPC. VPC Connectors are not transitive (do not route to other networks). You can route to AWS if you are using Google Cloud VPN to connect to AWS, – John Hanley Sep 02 '20 at 21:46
1 Answers
1
You can create a serverless VPC Connector in the Google CLoud VPC that you want and add it to your function.
On your function configuration, you can choose to route only the private IP through this connector, or all the requests initiated by the Cloud Functions.
So, if your route are correct, it should work!

guillaume blaquiere
- 66,369
- 2
- 47
- 76