EC2

Amazon EC2 (Elastic Compute Cloud) is Amazon service that allows rent virtual computers (see https://aws.amazon.com/ec2/). Here we explain how to launch EC2 instance with Ubuntu.

In order to create EC2 instance we need to configure the following

  • Amazon Machine Image (AMI)
  • Instance Type
  • Security Groups
  • Storage
  • Key pairs

Launch EC2

Launch

Go to https://console.aws.amazon.com/ec2 and choose Launch Instance.

png

Choose Amazon Machine Image (AMI)

Here we choose Ubuntu Server 18.04 LTS.

png

Choose Instance Type

Here we choose t2.micro

png

and the press Launch.

png

Key pair

Create key pair

Create key pair, if you do not have one or want to use different.

png

png

After downloading move it to .ssh.

mv bartek-aws.pem ~/.ssh

And set required permissions.

cd ~/.ssh
chmod 400 bartek-aws.pem

Select key pair

png

View Instances and connect

Now you should be able to connect through ssh.

png

ssh -i "bartek-aws.pem" ubuntu@xx.xxx.xxx.xxx