-1

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.

cami
  • 1
  • 1
  • Do you mean that after you setup the A record in the DNS settings, going to `example.com:8501` didn't work? What does "not reachable anymore" mean? What IP did the browser report it was trying to connect to? – Anon Coward Apr 07 '23 at 21:36
  • 1
    I’m voting to close this question because, as the dns tag explains: DNS QUESTIONS MUST BE PROGRAMMING RELATED. Use this tag for programming questions related to writing code that interacts with the Domain Name System (DNS); for example, writing code that uses gethostbyname() – Rob Apr 08 '23 at 12:35
  • @AnonCoward Before the A record setup in the DNS settings the webpage said "Under construction" while going to example.com said "It's impossible to reach the webpage", same problem going to example.com:8501. Last minute update: going to example.com:8501 works fine! the IP is the public IP associated to the EC2 instance. Now, how could the webpage be reached without specifying the 8501 port after example.com? Thank you very much for any help! – cami Apr 08 '23 at 18:19
  • If you want to connect to the web server on port 80, then run the web server on port 80. – Anon Coward Apr 08 '23 at 18:32

1 Answers1

0

Also, don't forget to open the port in the firewall on your server. What I did, using zero tier from Cloudflare. Is working good and was in 5 minutes up and running.