AWS CLI :

AWS CLI :

TASK DESCRIPTION:

1.Create a key pair.

2.Create a security group.

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

4.Create an EBS volume of 1 GB.

5.The final step is to attach the above created EBS volume to the instance created in the previous steps.

To use AWS CLI, we need to download and install it on the top of Operating System with which we are working. So, after installing to check whether its successfully installed, use the command:

aws --version
 

Here, we need to add the Access-key and Secret-key provided by AWS while creating this IAM User. Also, along with this we need to mention the default output format and the region. Here, region I am using is Mumbai i.e. ap-south-1.

No alt text provided for this image

So, now creating a keypair :

--key-name is an option to give a name to our key.

No alt text provided for this image

Now, we have our keypair ready and we can see that on the console too. 'taskkey' is created successfully.

No alt text provided for this image

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.Now, for creating a security group.

No alt text provided for this image
No alt text provided for this image

Now, lets create an EC2 instance. This instance will have the keypair and security groups attached that we created just now.

No alt text provided for this image

Our instance is now launched in ap-south-1a.

No alt text provided for this image

Now, we will create a 1 GB Volume using EBS. EBS comes under the EC2 service of AWS.The volume type will be general purpose SSD Volume:

No alt text provided for this image

Our EBS volume is now created and ready. This volume we need to attach to the EC2 instance we have created earlier.

No alt text provided for this image

Our volume is now successfully attached and we can see that in the Console of AWS:

No alt text provided for this image
No alt text provided for this image

So, this was all about my AWS CLI Task assigned to me in the ARTH - The School of Technologies.

To view or add a comment, sign in

More articles by Pawar Suvarna

Others also viewed

Explore content categories