More difficult is this: after deployment to the cloud server can not access through the public network.
I replied to say when a small detail of local development: through http://127.0.0.1:5000 is accessible, but through http: // [local ip]: 5000 is not accessible, then did not pay attention this point, thus creating a difficulty when deployed to the ECS.
The solution is to change a statement in server.py:
app.run(host="0.0.0.0", port=5000)
Reference material
1, Python: About flask project to deploy a cloud server Ali Detailed steps: https://blog.csdn.net/downloadervlink/article/details/82084001 , it can refer to nginx and gunicorn, I have not used these two;
2、
sudo lsof -i tcp:3030 kill -9 pid
3, linux install mysql: https: //www.cnblogs.com/chenhonggao/p/10918451.html
4, remember once Ali cloud server installation tragic history of Python: https: //blog.51cto.com/13760351/2385907 cid = 732341, which is installed by a python;?
After 5, ECS can not access through a wireless campus, including ssh and ftp, the phone switches to 4G hotspot, ok.