Is there a way to call external gRPC service?

I was planning to deploy a demo on Huggingface Space, but ran into a bit of an issue.

So, my demo partially depends on a gRPC service that I have deployed on an AWS instance. When I tried test running it, it just timed out with “Failed to pick subchannel” so I am guessing that there is an issue when trying to call a remote gRPC service from Huggingface Space. When I tested my demo by having the same setup in my local computer as I did in Huggingface Space, I had no issues. I also checked to see if the AWS instance was blocking anything, but that doesn’t seem to be the case either.

Long story short, my question is:
Is calling an external gRPC service (in an AWS instance) allowed?
If not, what are the exact restrictions Huggingface Space has regarding outbound requests?
(I have used Google Translate API from within Huggingface Space before and did not have a problem back then)

Thank you very much.

Is your Spaces lacking any AWS credentials to use the gRPC service ?

Maybe you have setup credentials via aws cli and it’s not the case on HF Spaces ?

Solved the issue.

Actually, it is not about protocol. It’s about the port number that we use for an external service.
We changed the service port to HTTP(80), and it works!

Hope it helps anyone who struggles with same issue :slight_smile: