Task 3.2 -AWS using CLI

AWS Cloud:

Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 175 fully featured services from data centers globally. Millions of customers — including the fastest-growing startups, largest enterprises, and leading government agencies — are using AWS to lower costs, become more agile, and innovate faster.

AWS provides two ways of infrastructure configurations.

  • Using the AWS web console: It is a graphical method to connect to various AWS resources, their configuration, modification, etc. It is simple to use and does not require knowledge of scripting
  • AWS Command Line Interface: Usually, the script provides you with the flexibility to manage multiple AWS resources, infrastructures effectively. For example, we can use the script to deploy multiple resources without the need to go through a complete configuration wizard each time
  • It is an open-source tool to communicate with AWS resources and services using a command-line interface. We can manage all AWS services and control their behavior using this tool. We can also use CLI to automate AWS infrastructure resource and service management.

Prerequisites:

You should visit Amazon Web Service Console and create an AWS account. You can create a free tier account to explore AWS resources without any cost and with a limitation.

To download AWS CLI for windows click here after downloading we just need to install, Once installation complete let’s check using command in Command prompt

aws --version

we need to configure the IAM — User profile that I have already created earlier, by using access key, secret key and region name.

Now, in this article i wanted to show how 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 1 GB.

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

All the above steps are going to perform using AWS CLI.

We don’t need to remember any commands everything can be found in command prompt using

aws ec2 help

1.Creating key pair

aws ec2 create-key-pair --key-name <any name>

check through webui

2.creating Security groups

A security group acts as a virtual firewall for instance to control inbound and outbound traffic. When we create a security group, we have to specify a name of our choice. we can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, we 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.

aws ec2 create-security-group --group-name <name of security> 
--description "any text"
--vpc-id <vpc_id>

check through webui

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

aws ec2 run-instances
--image-id < any image id here am used redhat image>
--instance-type <t2.micro>
--count 1
--subnet-id <id of subnet>
--security-group-ids <security_group_id which is created above>
--key-name <key_pair_name>

check through webui

4.Creating an EBS volume of 1 GB.

aws ec2 create-volume 
--availability-zone ap-south-1a (this is i used)
--size 1
--volume-type gp2

check through webui

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

aws ec2 attach-volume
--volume-id <volume_id which we want to attach>
--instance-id <id of instance>
--device /dev/xvdh

check through webui

hope you guys are ease with my work

I would like to thanks Mr.Vimal Daga Sir for giving RightEducation which helps me to explore my core concepts of Cloud Computing.

!!Thank you for reading…

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Transaction Monitoring: Rule Building

BBOOTS — Mini CMS system for phpBB

How to version Docker images with GitLab CI/CD

Rest APIs — DogRestAPI

Mastering Python Fundamental in 3 days | Day 1 |Python Installation And First Program With Python

From zero to Rubik’s cube solving robot

Building a Bot in a Day at NIBC’s RPA Hackathon · Ciphix

Post-Pandemic Scenario: Will RPA Be An Important Part of Your Organization’s Budget in 2021?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kotireddykasu

Kotireddykasu

More from Medium

Learn How To Get the File name and File ID From Google Drive In Apps Script

Google Apps Script — Getting File Name And Id From Google Drive Files

Launching an EC2 instance with an apache web server

How to Set-up and Configure Docker On AWS cloud

Deploy to Cloud Run an API built with HAPI framework