How to launch EC2 instance
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
.
Choose Amazon Machine Image (AMI)
Here we choose Ubuntu Server 18.04 LTS
.
Choose Instance Type
Here we choose t2.micro
and the press Launch
.
Key pair
Create key pair
Create key pair, if you do not have one or want to use different.
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
View Instances and connect
Now you should be able to connect through ssh
.
ssh -i "bartek-aws.pem" ubuntu@xx.xxx.xxx.xxx