AWS COMMAND LINE INTERFACE
What is AWS CLI ?
The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.
Task Description :
- 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.
Step 1 : Create a key pair
Step 2 : Create a security group
Add rules in the security group rules using the following command
aws ec2 authorize-security-group-ingress --group-name sgforssh --protocol tcp --port 22 --cidr 0.0.0.0/0
To check whether the security group created or not :
Here we can see that the security group created which allows SSH from any IP's of the world. By default all the ports allowed in egress.
Step 3 : Launch an instance using the above created key pair and security group
Step 4 : Create an EBS volume of 1 GB
Step 5 : Attach the volume to the instance which is created previously
To verify that volume is attached to the instance use the following command :
To delete the volume created we must first terminate the instance , to stop , terminate instance and delete the volume use the following commands :
Excellent Venu Dadi