Describes how to create a Ubuntu Linux virtual machine on the Amazon Cloud.
Sign-up for the Free Tier account on AWS. The account is free for 12 months and allows for limited usage.
Unfortunately, it requires credit card information. Be careful not to exceed the usage and to disable all services before the 12 month period is up as you will be charged.
- Sign-in to the AWS Management Console and select EC2 (Elastic Compute Cloud)
- Click on Launch Instance
- Select the Ubuntu image (Ubuntu Server 14.04 LTS). It should also say "Free tier eligible".
- On the Instance Type screen, select the "Free tier eligible" option
- Click Review and Launch
- IMPORTANT: A prompt will pop up to create a key pair. This will generate a private key file that is required to login to your server. You will not be able to download this file again in the future.
- Enter a key pair name (i.e. UbuntuTestKey) and click Download Key Pair
- Save the file (.pem file) to a safe location
- Click Launch Instances to create the server. The Launch Status page will display the status.
- The server instance will be created. It can be viewed in the Management Console under Instances.
By default, port 22 will be open and SSH is available.
On a Unix machine, the instructions are:
- Open up a terminal and go to the location where the .pem file is saved
Change the permission of the file to 400
chmod 400 UbuntuTestKey.pem
- Connect to the server. The server DNS name (in the example below it is ec2-52-36-57-96.us-west-2.compute.amazonaws.com) can be found under Instances - "Public DNS". Alternatively, you can use the Public IP.
ssh -i "UbuntuTestKey.pem" email@example.com
Every time the server instance is restarted, it's IP and DNS name is changed. To avoid that, you can create an Elastic IP, which will provide a static IP (and DNS name) that can be associated to the server instance.
- In the Management Console, go to Network & Security - Elastic IPs
- Click on Actions - Allocation New Address. Confirm the creation on the prompt.
- The new Elastic IP will appear. Right click and select Associate Address.
- A form will pop up. Click on the Instances textbox and the server instance will be listed. One selected, click on Associate.
- The server instance is now associated to the Elastic IP.