I managed to get my Angular 5 app running on AWS EC2 Ubuntu...
Started standard Ubuntu instance, used PuTTy to shell in, installed node, entered the next 4 \"magic l
You need to check few things in your EC2 instance first
First check that port 4200 or any port that you want to use for Angular is added in security group to accept the traffic.
After allowing the port run ng serve with correct domain name or Public DNS shown in EC2 Instance for example
"ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com"
Hot Fix:
If you are getting this error with localhost:4200 you can try ng serve --host 0.0.0.0
To add specific port you can execute the command as follows: ng serve --host 0.0.0.0 --port 4200
Hope this will fix your issue.