I already have a domain hosted on Aruba. I built a streamlit web application which when running is exposed on port 8501. The app has been deployed on an EC2 instance on AWS and is accessible through the internet via public IP:8501. The EC2 instance needs now to be connected to the domain but I can't figure out how to set things up. Sorry if I'm being naive on this topic, this is the first app hosted online for me. Thanks for any help!
I tried to connect the EC2 instance to the domain by associating an elastic IP to the instance and specifying the resulting public IP in record A in the domain DNS manager. I set the security group of the EC2 instance open on port 8501. The domain though is not reachable anymore through the internet this way. I also tried to set Route53 created NSs as domain's Record Name Server but it says NSs are not valid. The EC2 instance running the streamlit app is reachable at IP:port. If only the IP is specified, the page says 'Connection refused'. I was wondering how to connect the AWS EC2 to the domain.