Calling external API from javascript liquid template

Hi Everyone,

I don’t know if this location is the right location for this subject but anyway :

I am not a shopify app developer, and never used shopify before so pardon my ignorance. I have developed an API for a client using shopify which was supposed to be called from the javascript present in a file called theme.liquid. But from this file, I have encountered a CORS policy error which prevent me from calling my newly built API. After some research I found out that a possible solution could be a custom app built and install for my client. But with my poor experience with shopify development, I could not manage to create a custom App and deploy it on an AWS instance (EC2).

I was wondering if there is an easier way to create a redirection from the shopify back-end (which would be an authorized domain falling out of the CORS scope) to my api URL ( which is hosted on AWS if needed).

If not, and I have to create a custom app, can someone provide me with a working example on a cloud instance ?

I can explain more my own context if necessary.

I really hope there is an easier way to do what i was considering as a simple task aha.

Thank you for time, if you need more information feel free to ask !

RB