Issues Running Angular with Cloud9 on aws


Im trying to get the basic angular app up and running on AWS using cloud 9.
Ive run through the setup suggested here
https ://
along with using the newest versions of things.

When I try to start the server I use
ng serve --host –port 8080 –live-reload-port 8081 –public-host
I see this in the terminal
** NG Live Development Server is listening on, open your browser on http://localhost:8080/ **
Date: 2018-01-03T18:28:58.415Z
Hash: 43ba61e9120cef67c91e
Time: 8981ms
chunk {inline} inline.bundle.js (inline) 5.79 kB [entry] [rendered]
chunk {main} main.bundle.js (main) 19.5 kB [initial] [rendered]
chunk {polyfills} polyfills.bundle.js (polyfills) 557 kB [initial] [rendered]
chunk {styles} styles.bundle.js (styles) 33.8 kB [initial] [rendered]
chunk {vendor} vendor.bundle.js (vendor) 7.16 MB [initial] [rendered]

webpack: Compiled successfully.

When I try preview running application it shows "invalid host header"
Any ideas what I might be doing wrong?


I was able to get this to work by editing the security group on the EC2 instance.
I added a custom TCP rule with port 8080 to the inbound security rule.
Then run ng serve --host –port 8080
This allows me to open the app in a browser using EC2-IP:8080


One of the issues I had with AWS development was the confusing security rules. There was little documentation and zero support unless you paid a fee. I am still able to run apps on Cloud 9 without this. At least the last I checked. I don’t have an AWS account as I closed the free tier because I started to get real charges on my credit card.