Building a simple Architecture on AWS using CLI

AbhishekRaj
3 min readMar 20, 2021
AWS

Hello Folks!!

In this article, we are going to build a simple architecture on AWS using CLI.

This architecture includes:

  1. Creation of Key-Pair.
  2. Creation of Security Group.
  3. Launching an EC2 instance using the above key pair and security group.
  4. Creation of EBS volume of size 1Gb.
  5. Attaching the above created EBS volume to the above-launched EC2 instance.

There are some prerequisites for configuring this architecture:

  1. AWS-CLI software should be downloaded and configured in our command prompt.
  2. All the login credentials of the IAM user including the Access key ID and Secret Access Key must be there with us. We can download these credentials at the time of the IAM user creation.

Now let's start configuring the architecture:

Step 1: We have to configure our AWS account in the command prompt by providing the Access Key ID, Secret Access Key, Region name, and output format.

AWS account configuration in command prompt

Step 2: Creation of key-pair

Creation of key-pair

We can confirm whether the key-pair is created or not by looking at AWS Web Console.

Key-pair created.

Step 3: Creation of Security group.

Creation of Security Group
Confirming whether a security group is created or not through WebConsole.

Step 3: Launching an EC2 instance using the above key pair and security group.

Launching an EC2 instance using the above key pair and security group.
Confirming EC2 instance is launched or not

Step 4: Creating an EBS volume of size 1Gb.

Creation of EBS volume of size 1Gb.
Confirming whether the EBS volume is created or not.

Step 5: Attaching the above created EBS volume to the above-launched EC2 instance.

Attaching the above created EBS volume to the above-launched EC2 instance.
Confirming whether the EBS volume is in use or not.

Finally, we have configured the whole architecture by attaching the EBS volume to the EC2 instance at the last.

Thanks!! for giving a look at my article.

If anyone has any query related to this article. They can DM me on my LinkedIn https://www.linkedin.com/in/abhishek-raj-6040a71a6/

--

--