Create your first free tier EC2 instance Debian 9 stretch
Launch First Free Tier EC2 Instance Debian 9
Aws Cloud provides a very user-friendly console on which you can launch first-ever EC2 instance without any much hard work.
This article is for freshers or newbies who just started working on AWS Cloud and want to have experienced the great cloud-based technology.
I will share with you the step-by-step process to launch your server with the screenshot.
Aws Cloud provides a total of 8 families of instance types and you can use whichever is good for your project and according to your budget.
Now we are going to launch Debian 9 stretch Linux a Free tier Ec2 instance type t2.micro.
If you are new to AWS cloud and want to create your own AWS cloud Account then read below article,
Step 1: Login AWS Account
I hope you already have an account on AWS Cloud if not then read the link which I shared above. First, go to the Amazon console using URL “https://aws.amazon.com/” and log in with your amazon credentials.
Step 2: Select Region
Aws provides 18 regions, you can choose the region according to your geographic location.
If you choose the region on the basis of geographic location then you will have better performance in terms of data IN/OUT transition.
If you stay in India then choose Mumbai location to improvise server performance.
Now I am launching a server in the Mumbai region.
Step 3: Launch Instance
After selecting the region, Go to the “Services → EC2”.
Once you are in the EC2 console, you will find the button on page “Launch Instance”.
Click on the “Launch Instance”
Step 4: Choose an Amazon Machine Image (AMI)
Here, We are going to choose Debian 9 Stretch AMI to launch our first free tier instance.
Click on the “AWS Marketplace” and search for “Debian” in the search bar. You will get the Debian 9 Strech AMI option where you can choose first AMI which includes the Support to keep your server up and running properly and Second AMI is without support included but it is also a stable version.
I am selecting the first option here and click on “Select”.
Step 5: Choose an Instance Type
Now you need to choose an instance type as per the requirement of a server hardware configuration for your project. One thing keeps in mind if you want free instance then AWS provide only t2.micro instance type which has 1GB of RAM and 1 Core CPU.
Click the checkbox on t2.micro and click the next configuration.
Step 6 : Configure the Instance
Now we are going to configure the instance details. Here keep all the settings default except below some points.
- Keep instance count 1
- Keep network settings default
- Change subnet zone to ap-south 1a or 1b nothing much difference.
- Keep IAM role none
- Keep shutdown behavior Stop.
- Tick on enable termination protection
- Keep monitoring as it is.
Step 7: Add Storage
Here, you can add the storage capacity as per requirement. You can be increased the root partition size or also you can add a new volume to the server. In free tier EC2 keep default storage value.
Note : If you are saving any important data on storage volume then make sure you would enable the Encrytion on that volume.
Step 8: Tag Instance
Now give a name for your ec2 instance and click on the Next button.
Step 9: Configure Security Group
Security is a very important thing when it comes to protecting your business. Aws provides an internal firewall in the form of a security group that restricted unknown IPs from hacking or accessing your instance.
As of now, we have open two ports one is SSH, and the other is HTTP. Once you launch instance you can add new rules as per your requirement. Best practice, allow ssh access for your office IPs or restricted to known IPs only.
Step 10: Review and Launch
Click on the “Review and Launch” button it will give you a final view of your configuration settings which you have selected for the Ec2 server.
Go through all settings and then click on Launch Button.
Step 11: Launch Ec2
That’s it this is our last step of Launching Ec2 server.
Click on “Launch” then it will prompt you to give a name for your server key and download the key.
Do remember one thing, this is the last chance to have the key to download if you skip this or misplaced your server key you won’t be able to log in on the server.
Save key and click Launch Instance.
Step 12: Login on Server
Now go to “Services → EC2 → Running Instance” and Click on your server then come down you will find Elastic IP for your server. Copy that IP and open terminal then run below commands,
Note the First time when you log in to the server you need to log in with admin user and once you logged in then do sudo su – so you will have root access on the server.
$ chmod 400 Downloads/Ec2ServerKey.pem
$ ssh -i Ec2ServerKey.pem [email protected]
I hope you like the article on “Create First Free Tier Instance”. If you’re facing any difficulties while adding Amazon EC2 Instance. Please do comment queries or problems via the comment section, till then stay tuned to Linuxgrow.com for more such valuable articles.