In this tutorial you will learn how to create and run a new EC2 Ubuntu instance in AWS.
We’ll be using all the options which are eligible under the AWS Free tier account. To follow along this tutorial please create a Free tier eligible account in AWS.
Steps to create a new EC2 Ubuntu instance:
1. In the AWS console click on Services -> EC2.
2. Click on Launch instance.
3. Choose any Amazon Machine Image for Ubuntu (Ex – Ubuntu Server 20.04 LTS (HVM)) and click on Select.
4. Choose any Instance Type (Ex – General Purpose, t2.micro) and click on Next.
5. Don’t change anything on the Configure Instance Details page and click on Next.
6. In Add Storage page, enter the volume size (Ex – 16 GB) and click on Next.
7. Click on Add Tag, enter Key = Name and Value = Demo EC2 Server. Click on Next.
8. In Configure Security Page, enter a Security group name: demo-security-group and add the following Rules.
9. Click on Review and Launch.
10. In Review Instance Launch page, review all the details entered for ec2 instance and click on Launch.
11. Choose Create a new key pair, enter a new key pair name “aws-demo-key” and click on Download Key Pair.
12. Click on Launch Instances.
13. Go back to your EC2 dashboard and a new Ubuntu EC2 instance will be in running status.
14. Select the instance and Click on Connect. Select SSH client
15. Launch command prompt. Go to the folder where you have saved the private key file(.pem)
16. Copy the command provided in the Example in SSH client and enter in the command prompt