0

I am looking to use my domain with my cloud function. Currently there's one way to do it using Firebase Hosting + Cloud functions but that just supports JS and TS for now. Anyway we can assign custom domain for python cloud function?

Ayush
  • 1

1 Answers1

0

There are two ways of having domains for firebase functions / Google Cloud Functions.

  1. Rewrites with firebase.json: First way is a URL rewrite with Firebase hosting - Simple to do, Works on domain or sub-domain. 5min Video: https://www.youtube.com/watch?v=c93iGKyvh3o

  2. GCP Load-Balancer: Second way helps accomplish many use-cases including helping traffic flow via a domain/sub-domain and function egress traffic go via VPC i.e. more control of traffic and routing.

Internet <----> GCP HTTP Load Balancer <----> Serverless NEG <----> Functions

In your case, only option 2 with load balancer is what you need

Reading: https://cloud.google.com/blog/products/networking/better-load-balancing-for-app-engine-cloud-run-and-functions

udaykor
  • 11
  • 2