- Make sure instance is allowing HTTP traffic through the SecurityGroup (Type:
HTTP
, Protocol:TCP
, Port Range:80
, Source:0.0.0.0/0
on EC2. Note: THIS CAN ONLY BE DONE WHEN YOU ARE SETTING UP THE IMAGE - SSH into the machine:
ssh -i [MYCREDS].pem ubuntu@[public ip]
- Install whatever packages/Python you need
- Redirect HTTP traffic from port 80 to another port greater than 1024. 8080 is a common choice:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080