Services -> Cloud9 -> Create Environment -> <yourname>-cloud-laptop -> Click on Next -> Click on Ubuntu -> Click on next step -> Confirm
Services -> Cloud9 -> Open IDE
$ ssh-keygen -b 2048 -t rsa -q -N ""
Enter file in which to save the key (/home/ubuntu/.ssh/id_rsa): [Press enter]
This will create a file in
cd $HOME/.ssh
cat id_rsa #this is the private key
cat id_rsa.pub #this is the public key
Services -> EC2 -> Network and Security -> Key Pair -> Actions -> Import key pair -> <yourname>-key -> Paste the public key
Services -> EC2 -> Instances -> Launch Instances -> Ubuntu 20 Select -> t2.micro -> Next: Add Storage -> Next: Add Tags -> Add Tags -> Name: <yourname>-instance-1 -> Next: Configure Security Group -> SSH Port 22 0.0.0.0/0 -> Review and Launch -> Launch -> Choose Key Pair -> your keypair -> Click on the tickbox -> Confirm
find the IP address of the Instance -> Services -> Ec2 -> click on the instance -> look for the private ipv4 address
go back to the cloud9 tab -> ssh ubuntu@<IPV4 Address>
Install NGINX
sudo apt-get install nginx
[When prompted type 'y']
Turn on NGINX
sudo systemctl start nginx
Test
curl localhost:80
Find the Public IPv4
Services -> EC2 -> Click on the Instance -> Copy the Public IPv4
Open your browser the public IPv4. It does not work
Open the Port 80 to the world
Services -> EC2 -> Click on the Instance -> Click on the Security Tab -> Click on the security Group -> Click on the inbount rule -> Add rule -> Port: 80 Source: 0.0.0.0/0 -> Save Rules
Open your browser to the public IPv4