POST Request to AWS Server Not Working

Hi!

I’m struggling to get my network request to work on Wix Velo. For reference, it 100% works when I create local node js project on my computer and run it . It doesn’t work on Wix Velo even when I copy and paste the exact same code from the local node js project that worked on my computer. I have ensured countless times that the endpoints and everything are the exact same. Here is the code I wrote on Wix:

import axios from ‘axios’;

$w . onReady ( async () => {
console . log ( ‘opening’ );
const data = {
*** data ***
};

**try**  { 
    **const**  response  =  **await**  axios . post ( 'some-aws-ec2-endpoint' ,  data ); 
    console . log ( response ); 
}  **catch**  ( err ) { 
    console . log ( err ); 
} 

});

When I run on Velo, I get the following error message:

AxiosError: Network Error. 

It’s not super descriptive, so I’m not sure what to do. I’ve also tried using Wix’s fetch function, but that gave me nearly the same result.

I’m not sure what else to do as I’ve been trying to debug this for hours. As I said, I got it working on my local computer within minutes and it hasn’t worked on Wix a single time.

Any help would be greatly appreciated!