Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to deply function on Firestore set to europe-west

I am writing to seek assistance with a deployment issue I am facing while attempting to deploy a Firebase function on a Firestore database set to the europe-west region.

I have successfully deployed my Firestore database using Firebase, leveraging the multi-region support feature. However, when I try to deploy a Firebase function, I encounter a problem. If I specify "europe-west" as the region, I receive an error message stating that the region does not exist. On the other hand, if I opt for a specific subregion such as "europe-west3," I am informed that the database itself does not exist.

I have made sure to double-check the region settings of my Firestore database, and it is indeed set to the europe-west region. However, I am unable to deploy my Firebase function to this particular region, leading to the aforementioned error messages.

I am reaching out in the hopes that someone can shed light on this issue or provide guidance on how to resolve it. Has anyone else encountered a similar problem with deploying Firebase functions on Firestore databases set to a multi-region Firestore, such as the europe-west region? If so, I would greatly appreciate any insights, suggestions, or potential workarounds that you could offer.

Thank you in advance for your attention and assistance. I look forward to hearing from the community.

Solved Solved
0 3 3,236
1 ACCEPTED SOLUTION

Your Firebase function deployment error you're encountering seems to be related to a regional designations and their compatibility with Firestore and Firebase Cloud Functions.

Pleaae note the following:

  1. Firebase Cloud Functions are available in the following europe-west regions with Tier 1 pricing: europe-west1 (Belgium) and europe-west2 (London)​.

  2. With Tier 2 pricing, Firebase Cloud Functions are available in europe-west3 (Frankfurt) and europe-west6 (Zurich)​.

  3. Firestore supports the multi-region eur3 which consists of europe-west1 (Belgium), europe-west4 (Netherlands), and a witness region europe-north1 (Finland)​.

  4. Firestore also supports the following europe-west regional locations: europe-west2 (London), europe-west3 (Frankfurt), europe-west4 (Netherlands), and europe-west6 (Zurich)​.

  5. Given this, you can see that the region you're using for Firestore (europe-west) is a broad designation for multiple specific regions, and is not directly compatible with the regions available for Firebase Cloud Functions.

See the following link for more details: https://firebase.google.com/docs/functions/locations

If you want to keep your Firestore data and Cloud Function in the same region, you'll need to choose a specific subregion that is available for both Firestore and Firebase Cloud Functions, such as europe-west1, europe-west2, europe-west3, or europe-west6.

Please note that if you choose to use different regions for your Firestore and Firebase Cloud Function, you can still use them together, but there will be trans-region egress costs and potential latency issues that you'll need to keep in mind​.

View solution in original post

3 REPLIES 3

Your Firebase function deployment error you're encountering seems to be related to a regional designations and their compatibility with Firestore and Firebase Cloud Functions.

Pleaae note the following:

  1. Firebase Cloud Functions are available in the following europe-west regions with Tier 1 pricing: europe-west1 (Belgium) and europe-west2 (London)​.

  2. With Tier 2 pricing, Firebase Cloud Functions are available in europe-west3 (Frankfurt) and europe-west6 (Zurich)​.

  3. Firestore supports the multi-region eur3 which consists of europe-west1 (Belgium), europe-west4 (Netherlands), and a witness region europe-north1 (Finland)​.

  4. Firestore also supports the following europe-west regional locations: europe-west2 (London), europe-west3 (Frankfurt), europe-west4 (Netherlands), and europe-west6 (Zurich)​.

  5. Given this, you can see that the region you're using for Firestore (europe-west) is a broad designation for multiple specific regions, and is not directly compatible with the regions available for Firebase Cloud Functions.

See the following link for more details: https://firebase.google.com/docs/functions/locations

If you want to keep your Firestore data and Cloud Function in the same region, you'll need to choose a specific subregion that is available for both Firestore and Firebase Cloud Functions, such as europe-west1, europe-west2, europe-west3, or europe-west6.

Please note that if you choose to use different regions for your Firestore and Firebase Cloud Function, you can still use them together, but there will be trans-region egress costs and potential latency issues that you'll need to keep in mind​.

Thank you, great answer. I believe that it is not possible to move my Firebase instance (there's no user data in it) and that I have to recreate my project, is that correct? 

Yes, that is correct. Unfortunately, there was no built-in way to change the region of an existing Firestore database. If you need to change the region, you would need to create a new Firestore database in the desired region.

This would mean creating a new project in the Firebase console and initializing a new Firestore database in that project with the correct region. You would then need to migrate any existing data and update any application code to use the new Firestore instance in the new project.

Please note that this will also require you to set up any other Firebase services you're using (like Authentication, Hosting, etc.) in the new project.