How to Create a Linux Virtual Machine in AWS βοΈ: A Beginner-Friendly Guide
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:
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.
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.
Easy Customization! π§°
- You can install any software you want on your EC2 instance, much like customizing your car with gadgets.
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
Don't worry In My previous blog I have already covered How to create an AWS account, please follow the link
πΉ 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 π»β¨