This page contains answers to common App Engine connectivity questions, including questions related to using Serverless VPC Access and internal IP addresses.
Set up inbound connectivity from VPC to App Engine instances using an internal IP address
Serverless VPC Access is useful when making calls from Google's serverless offerings to a Virtual Private Cloud (VPC) network, but you can't access App Engine instances using an internal IP address.
To connect to App Engine from the VPC network using an internal IP address without an assigned external IP address, do the following to access Google APIs and services:
- Set up Private Google Access. Ensure that the App Engine service uses a Private Google Access-enabled subnet.
- Use a Private Service Connect endpoint. Ensure that the endpoint is connected to the Private Google Access-enabled subnet.
- Send traffic to the Private Service Connect endpoint. Ensure that the endpoint is connected to the subnet.
App Engine instances with external IP addresses can send traffic to Private Service Connect endpoints without any requirements.
Connect App Engine to Cloud SQL private IP addresses
This scenario may be encountered when you want to connect from App Engine standard environment or App Engine flexible environment apps to Cloud SQL instances over private IP addresses.
In this scenario, create a connection using one of the following options:
- App Engine standard environment: Use the Serverless VPC Access connector to connect to Cloud SQL over internal IP addresses. To learn more, see Connecting from App Engine standard environment to Cloud SQL.
- App Engine flexible environment: Deploy your flexible environment app in the same VPC network as your Cloud SQL instance. Your app should now be able to connect directly using Cloud SQL instance's private IP address. To learn more, see Connecting from App Engine flexible environment to Cloud SQL.
Troubleshoot a Cloud SQL instance using public IP addresses
When deploying an older App Engine standard environment app with Cloud SQL using Unix sockets, you might see a few error messages if your app is not correctly configured to connect to a Cloud SQL instance.
The following warning message indicates that App Engine was able to fall back on a legacy connection method to complete the operation successfully:
CloudSQL warning: your action is needed to update your application and avoid potential disruptions. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ...
The following error message indicates that the operation to connect to Cloud SQL was not completed successfully:
Cloud SQL connection failed. Please see https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard for additional details: ...
For both error messages, you need to check the following to ensure that the Cloud SQL Auth proxy is correctly configured to connect to a Cloud SQL instance:
- The Cloud SQL Admin API must be enabled.
- The service account for the App Engine app must have the correct permissions.
- The instance connection name must include the region.
If the failure message persists after troubleshooting, contact Google Cloud Support for assistance.
Customize access permissions between App Engine services
This scenario can be encountered when you have multiple App Engine services and want to configure access permissions differently between services (for example, you want to enable access to App Engine Service A only from App Engine Service B).
In this scenario, you can use App Engine with Identity-Aware Proxy (IAP) to make only some of the services publicly accessible while keeping others protected. To learn more, you can see the Centralize access to your organization's websites with IAP video and refer to the IAP documentation.