My service is calling a 3rd party service (binance api) and there is a geo location description for US IP addresses (they banned all US IPs). My deployment's region set to Tokyo but the 3rd party services still sees that my request is coming from the US. Is there any solution to get a local ip address to functions where it is located?
Asked
Active
Viewed 41 times
0
-
A Google IP's location is the Google headquarters in the US. – John Hanley Dec 13 '22 at 18:59
1 Answers
0
You can achieve this requirement by creating a static external IP address in the same region. To achieve this go through this document which shows how to reserve IP address to a cloud function as it is mentioned clearly what you need to get
In some cases, you might want traffic originating from your function to be associated with a static IP address. For example, this is useful if you are calling an external service that only allows requests from explicitly specified IP addresses.
For more information you can go through this Thread

Rohit Kharche
- 2,541
- 1
- 2
- 13
-
This answer does not solve the problem because the IP address will still be registered to Google in the US. – John Hanley Dec 13 '22 at 18:57
-
@JohnHanley No As you will be creating an IP address in your VPC subnet that is in Asia will show the IP originates from Asia Itself. – Rohit Kharche Dec 14 '22 at 05:59
-
-
@JohnHanley Hi I was referring to this [document](https://cloud.google.com/functions/docs/networking/network-settings#route-egress-to-vpc) – Rohit Kharche Dec 14 '22 at 14:13
-
Thanks for the recommendation and for the comments. I think it would solve my problem but would add much more cost to my bill (around 20$ at least) so I just leave it. – Aron Dec 14 '22 at 16:22
-
Where in your document l link does it mention the location reported for an IP address? – John Hanley Dec 14 '22 at 18:57