Send only internal traffic to App Engine from Cloud Function

103 views
Skip to first unread message

Luis Cristóbal López García

unread,
May 22, 2021, 10:40:50 AM5/22/21
to Google App Engine
I am trying to connect my Cloud Function to App Engine allowing only internal traffic. These are the steps I have followed:
  1. Create a Serverless VPC Connector on the same region my two services are deployed with its own /28 subnet.
  2. Set the Cloud Function to route ALL the traffic through the Serverless VPC Connector.
  3. Set the App Engine to accept only internal ingress traffic.
I have also created a dummy HTTP Server on a Compute Engine instance without external IP. I sent a request to that server internal IP from my Cloud Function and it got a 200 OK response, so the Function is using the connector to route its traffic.

However, if I send a request to my App Engine appspot URL from the Function, it exits after 60 seconds with a timeout, meaning it is not able to reach the service.

Do you know if I am missing something?

Elliott (Cloud Platform Support)

unread,
May 24, 2021, 3:43:44 PM5/24/21
to Google App Engine

Hello,

Thank you for the detail you provided. From the description, I understand that your Cloud Function is timing out when communicating with your App Engine instance over an internal connection. Because Google Groups was designed for general discussions about Google products, there is not a secure way of sharing information. In this case, I would ask to see your logs for information but please do not post them here. I do believe that you have followed the necessary steps but the goal I am after is to look for a possible issue with the infrastructure. I do not see any common issue at this time relating to your question.

I am suggesting creating a Google Issue Tracker because I see the Stackoverflow thread and the discussion that followed. How would you feel by submitting a Google Issue Tracker to investigate a possible bug? I think that this would be the next logical step in this case. A private Issue Tracker will allow us to share project information.

Luis Cristóbal López García

unread,
May 25, 2021, 11:50:57 AM5/25/21
to Google App Engine
Thanks for the suggestion Elliott. I just created the issue describing the problem. I hope we can reach a solution soon.
Reply all
Reply to author
Forward
0 new messages