Manipulating AWS EC2 Services using Command Line
Task :-
- 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.
Lets Go ,
What is AWS?
Amazon Web Services (AWS) is a secure cloud services platform, offering to compute power, database storage, content delivery, and other functionality to help businesses scale and grow. Running web and application servers in the cloud to host dynamic websites.
Since we know that AWS is a technology and to use any technology like AWS, we have three ways:
- Using WebUI
- Through a program/code
- Using CLI (Command Line Interface)
In this article, I will be performing each and every step using the AWS CLI.
Step 1 :- Download and install AWS CLI program
use link :- https://awscli.amazonaws.com/AWSCLIV2.msi
Step 2 :- Now login to AWS using “aws configure” command and provide access key, secret key and selecting region
Step 3 :- Creating a Key-Pair, using command :
Key pair is successfully created :-
Step 4 :- Creating Security Group :
Note:- While Creating Security Group, description of security group is necessary to provide. Else Error will occur
Security Group is successfully created :-
Here, No Rules are created.
Step 5 :- Creating Inbound Rules
Inbound Rule is successfully created :-
Step 6 :- Launching Instance using same key-pair and security group we have created
Note: If we do not provide the Security Group, it will use the default security group. The same will be used for the default Instance Type: m1.small. And, it will also pick the default VPC as well.