How to Create a Linux Virtual Machine in AWS ☁️: A Beginner-Friendly Guide

How to Create a Linux Virtual Machine in AWS ☁️: A Beginner-Friendly Guide

Β·

4 min read

Are you interested in exploring the world of cloud computing? 🌍 Amazon Web Services (AWS) offers a fantastic way to start by creating your very own Linux virtual machine (VM). In this step-by-step guide, we'll walk you through the process simply and understandably, even if you're not a tech whiz! πŸš€

First, understand the below topics

🌐 What's an EC2 Instance? 🌐

Imagine an EC2 instance as a virtual computer in the cloud. It's like having a computer that you can access from anywhere in the world, 24/7. Here's how it works:

  1. Virtual Computers for Everyone! πŸŽ‰

    • EC2 instances are like renting a virtual computer on Amazon's cloud.

    • Just like you rent a car for a road trip, you rent an EC2 instance for computing tasks.

  2. Sizes for All Occasions! πŸ“¦

    • EC2 instances come in different sizes, just like cars.

    • You choose the one that suits your needs, whether it's a small sedan or a powerful SUV.

  3. Easy Customization! 🧰

    • You can install any software you want on your EC2 instance, much like customizing your car with gadgets.
  4. Pay as You Go! πŸ’°

    • EC2 instances are cost-effective because you only pay for what you use, just like renting a car only when you need it.

Let's go and Create our first Linux Virtual Machine in AWS

πŸ”Ή Step 1: Create an AWS Account

πŸ”Ή Step 2: Sign in to the AWS Console

  • Once your account is ready, sign in to the AWS Management Console.

πŸ”Ή Step 3: Choose Your Region

  • AWS has data centers in various regions worldwide. Select the one closest to you for better performance.

πŸ”Ή Step 4: Launch an EC2 Instance (Virtual Machine)

  • Go to the search bar, and type "EC2"

  • Click on Services->EC2

πŸ”Ή Step 5: Click "Launch Instance"

  • Once you click on EC2 you will be redirected to EC2 Dashboard page

  • In the left side Instances tab ->Click on Instances

  • Click on Launch Instances

πŸ”Ή Step 6: Launch an instance

  • Name and tags:-Type your Instance Name

  • Application and OS Image:-There are different Linux Amazon Machine Images available ->Choose Ubuntu

  • Architecture :-64-bit(x86)

πŸ”Ή Step 7: Choose an Instance Type

  • Select the instance type that suits your needs. T2 Micro is a good starting point.

πŸ”Ή Step 8: Key pair(login)

  • Choose to use a default key pair or create a new one for secure SSH login.

  • You can create a new key pair value -it is required during SSH login.

  • Click on the Create new key pair link->Fill the below details

  • Once click on the create key pair button, there is one '.pem' file will be downloaded to your machine.

  • In the '.pem' file include private and public keys for SSH login

  • You'll need a key pair to connect securely to your VM.

πŸ”Ή Step 9:Network Settings

  • Firewall(security groups)->Select 'Create Security group'

  • select below three checkboxes below

    Allow SSH traffic

    Allow HTTPS traffic from the internet

    Allow HTTP traffic from the internet

πŸ”Ή Step 10: Configure Storage

  • I'm selecting here the default storage option for Linux practice which is 8 GB

πŸ”Ή Step 11: Summary

  • Number of Instances-Here you can enter the number of instances (VM) required.

  • Review the software image, server type, security group, and storage data before you launch your instances.

πŸ”Ή Step 12: Launch Your Instance

  • Click "Launch Instances"

  • your Instance(VM) is running

πŸ”Ή Step 13: Connect to Your Linux VM

  • Once your VM is running, you can connect now

  • Here you have two options to connect your VM

    1.you can directly connect your instances(VM) using 'EC2 Instance Connect'

    option

    Now you have successfully connected your Linux Instance(VM)

    2. Using the SSH Client option. Use a tool like PuTTY (Windows) or Terminal (Mac/Linux).

πŸ”Ή Step 14: Use Your Linux VM

  • Congratulations! πŸŽ‰ You now have a Linux virtual machine in AWS. You can install software, host a website, or do almost anything you like.

By following these simple steps, you've taken your first steps into the world of cloud computing with AWS. Your Linux VM is your playground for learning and experimenting. Have fun exploring! πŸ˜ƒπŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Remember that while AWS offers a free tier, some services might incur charges, so be mindful of your usage. Enjoy your cloud journey! πŸŒ₯οΈπŸš€

If this post was helpful, please do follow and click the like button below to show your support πŸ˜„

_ Thank you for readingπŸ’š

_Sprasad 🌻✨

Β