Launching an instance on AWS and attaching a storage to it….

Divyaansh Jain
5 min readMar 21, 2021

I have previously discussed about Amazon Web Services(AWS) and “How AWS helped Netflix to become world’s leading streaming platform !?”

(You can check it out by clicking on the link attached with the previous quoted line)

So, after discussing about it, what we wanna do next ?????

Yes, you guessed it right, let’s learn AWS and start with it’s basic.

One of the most commonly used services in AWS is EC2 instance. Sounds interesting but what exactly is EC2 instance. Let’s see:

Amazon Elastic Compute Cloud or shortly Amazon EC2 is one of the AWS’s most well-known services that enable businesses to run their applications on the public and private cloud. The developers are free to create their customized virtual machines and configure them very quickly. Since developers are free to stop using the EC2 service whenever they want, they do not need to pay extra money for the unused resources. In other words, Amazon EC2 enables on-demand, scalable computing capacity in the AWS cloud.

Technical definition, hmm…… but what exactly it does ?

Photo by Jonathan Cosens Photography on Unsplash

Basically, AWS EC2 provides us resources which are RAM, CPU and Hard Disks along with an Operating System to do any tasks which we do on our local computers. It also provides security features for obviously securing your data.

Now, let’s see the steps for our practical:

  • Create a key pair
  • Create a security group
  • Launch an instance using the above created key pair and security group
  • Create an EBS volume of 1 GB
  • The final step is to attach the above created EBS volume to the instance you created in the previous steps

Creating a Key Pair: A key pair is needed to connect to your instance using SSH and when launching an instance you will be prompted to provide a key by creating a new one or selecting an existing one.

Creating a security group: A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. When you launch an instance in a VPC, you can assign up to five security groups to the instance. Security groups act at the instance level, not the subnet level. Therefore, each instance in a subnet in your VPC can be assigned to a different set of security groups.

Launch an instance using the above created key pair and security group:

  1. The Choose an Amazon Machine Image (AMI) page displays a list of basic configurations called Amazon Machine Images (AMIs) that serve as templates for your instance. Select the HVM edition of the Amazon Linux AMI. Notice that this configuration is marked Free tier eligible.
  2. On the Choose an Instance Type page, choose t.2micro as the hardware configuration of your instance and Review and Launch.
  3. On the Configure Instance Details, choose the subnet where you want to launch the instance. Note that we are using the default VPC.
  4. On the Add Storage, you can increase or decrease the size of the attaching storage or even attach a new volume. It’s like bootable hard drive.
  5. On the Add Tags, you can add Tags to your instance.
  6. On the Configure Security Group, we select an existing security group which we created previously.
  7. After all this, you will be prompted to select or create a Key Pair which in my case I have created previously.
  8. The last step just click on Launch Instances and you can see the instance summary as shown below.

Create an EBS volume of 1 GB: We create another Storage or EBS(Elastic Block Storage) volume to attach to our launched instance and we just provide the size and tags. After creating the volume we can attach it and it can be seen in the volumes section and we can check the state “in-use” to verify if it’s been attached.

We can also verify if the volume is attached by going to the volume section in the instance description under EC2 page.

And that’s it !!!!!!!!!

I will discuss some technologies in the further blogs, till then have a read at this.

Signing off

Link for my LinkedIn profile:

--

--