In this post I will show you how to launch and connect to a Linux EC2 instance on Amazon Web Service (AWS) cloud using AWS Management Console. Please watch my video tutorial for more detailed explanation and demo.
Launch Linux EC2 Instance
Below is the basic architecture diagram of the infrastructure where our Linux EC2 instance will be launched.
- Login to AWS Management Console using Root or IAM User credentials
- Make sure correct region is selected on the AWS Management Console. Sydney in my case.
- Click on EC2 under Compute section to open EC2 dashboard and click “Launch Instance” button
- Click on “Select” button next to Amazon Linux AMI
- Select “t2.micro” instance type and click “Configure Instance Details”
- Provide instance details as per the screenshot and click “Add Storage”
- Accept default volume and click “Add Tags”
- Tag the instance with a name of your choice and click “Configure Security Group”
- Create a new security group as per the screenshot below to allow SSH connections to the Linux instance and click “Review and Launch”
- Verify the instance configuration details and click “Launch”
- Select “Create a new key pair” and provide a name for the key pair. Make sure you download the keypair and keep it in a secure location. Click “Launch Instances”
- Click “View Instances” on the Launch Status page
- Make sure the new instance is in Running state and the status checks are successful.
- Make a note of the public IP of the instance and connect to it using below command using any SSH client (I am using mobaXterm)
- You should be able to login to the new EC2 instance as shown below
ssh -i "C:\path-to-keypair-location\MyEC2KeyPair.pem" email@example.com