Task 1 AWS CLI(Command Line Interface)

Task 1 AWS CLI(Command Line Interface)

Hello Everyone !!!

Today’s my Article is on AWS CLI

In this task we have to

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 size 1 GB.

And the final step is to attach above created EBS volume to the Instance created in previous steps.

 what is AWS CLI ??

  • The AWS Command Line Interface (CLI) is a unified tool to manage our AWS services.
  • We can control multiple AWS services from the command line.

First, we need to download the AWS CLI.

You can download from the below site. https://awscli.amazonaws.com/AWSCLIV2.msi

First check cli installed or not

for this use command..

<aws --version>

AWS Configure

After installing the AWS CLI, we now need to configure the application to be able to connect to our AWS account.

For this Command is..

<aws configure>

After this we have to login by AWS access key ID and AWS secret access key.

No alt text provided for this image

Now, we have to Create a Key Pair

we have to search for available command

No alt text provided for this image

Now, use the below command

aws ec2 create-key-pair --key-name firstSkey

No alt text provided for this image

Create a Security group

we have to search for available command

No alt text provided for this image

Now, use below command for this

aws ec2 create-security-group --group-name firstSG --description “FirstSG”

No alt text provided for this image

Launch ec2 instance using the above created Key pair and Security

Now, search for available command to run the instance..

No alt text provided for this image

Now, we launch the ec2 Instance by using the command…

aws ec2 run-instance --image-id ami-0e306788ff2473ccb --instance-type t2.micro --count 1 --subnet-id subnet-37666f5f --security-group-ids sg-067ccba5d22175a53 --key-name firstSkey

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

Status of Running instance in WebUI

No alt text provided for this image

Create an EBS Volume of size 1 GB

Now, search for available command

No alt text provided for this image

Now,use the below command to create volume of size 1 GB

aws ec2 create-volume --volume-type gp2 -- size 1 --availability-zone ap-south-1a

NOTE: The EBS Volume should be created in the same availability zone as of EC2 instance to be it should be attached

Attaching above created EBS volume to the ec2 Instance

Now, search for available command

No alt text provided for this image

Attaching above created EBS volume to the ec2 Instance

Now, search for available command

No alt text provided for this image

Now, use the command to attach above volume to ec2 instance

aws ec2 attach-volume --volume-id vol-1234567890abcdef0 --instance-id i-01474ef662b89480 --device /dev/sdg

No alt text provided for this image

Status of Volume attach in WebUI

No alt text provided for this image

Thanks for reading!! ???

Be safe take care ?














Vinod Tak

DevOps Engineer | Cloud Engineer| Docker | Jenkins | Kubernetes | Terraform | Squadcasts

4 年

Great work Harsh Rajotya

Mudit Mathur

DevOps Cloud Engineer | PGDM in Big Data Analytics | AWS | CI/CD | Kubernetes | Automation | IT Enthusiast | Problem Solver | Startup Mindset

4 年

Good Job Harsh Rajotya bro ???

要查看或添加评论,请登录

Harsh Rajotya的更多文章

  • AWS: Netflix Case Study

    AWS: Netflix Case Study

    What is Cloud Computing? Cloud computing is the practice of delivering resources including tools and applications like…

  • Deploy the Wordpress application on Kubernetes and AWS using terraform and RDS Task 6

    Deploy the Wordpress application on Kubernetes and AWS using terraform and RDS Task 6

    What is Kubernetes? Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and…

  • Task-4(Hybrid Multi Cloud Computing)

    Task-4(Hybrid Multi Cloud Computing)

    In this task perform task-3 with an additional feature to be added that is NAT Gateway to provide the internet access…

  • Task 3- Create a vpc Infrastructure and Host a wordpress Application with Mysql

    Task 3- Create a vpc Infrastructure and Host a wordpress Application with Mysql

    Finally completed!!! . In this task we have to create a web portal for our company with all security as much as…

  • Automate AWS cloud using TERRAFORM

    Automate AWS cloud using TERRAFORM

    TASK 2 Description Create Security group which allow the port 80. Launch EC2 instance.

  • AWS-EKS

    AWS-EKS

    ELASTIC KUBERNETES SERVICE: Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service…

  • task 1

    task 1

    What is Cloud Computing? Cloud computing is the on-demand availability of computer system resources, especially data…

社区洞察

其他会员也浏览了