I have started a Flask Webserver on an Amazon Linux 2 EC2 instances
(venv) [ec2-user@ip-10-0-1-63 microblog]$ flask run
* Serving Flask app 'microblog.py'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
Press CTRL+C to quit
When i try to access the Web either via the below Public V4 DNS or Public V4 IP i get "Site cannot be reached"
- http://34.228.161.61:5000
- http://34.228.161.61:5000/index
- https://ec2-34-228-161-61.compute-1.amazonaws.com:5000
- https://ec2-34-228-161-61.compute-1.amazonaws.com:5000/index
I have successfully launched an Apache Web Server into the same EC2 & VPC instances and have no issues.
Also running curl from the same server i launched flask returns the contents
[ec2-user@ip-10-0-1-63 ~]$ curl http://localhost:7999
Hello, World![ec2-user@ip-10-0-1-63 ~]$
(tried a range of other ports also)
Any clues on what to do to get it working from my Chrome/Safari browser?
Tried so far
- Ensured EC2 was talking to the web
- Ensured VPC had route to the public internet
- Ensured other webservers could be launched successfully from the same EC2 instance