How does anyone connect Netlify website to AWS ec2 server

I posted my AWS Developer Associate website using Netlify.

And I deployed my backend using AWS ec2, with opening port 5000.

So, my website made by React. I try to access my backend using Axios.

axios.post(`http://aws-server-ip:5000/tiny/?url=${this.state.url}`)
      .then(res => {
            this.setState({
                 //Do something...
            });
       })
       .catch(function (err) {
                alert(err)
       })

But, the website always says Network Error . I think they can’t reach my aws ec2 server.

Do I need more action for solving this problem?

P.S. I already open my port 5000 in the security group inbound rule.