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.
Step1 : Creation of key pair using following command aws ec2 create-key-pair --key-name aws_task1
Step2 : launch the instance with the above created key-pair and security group by using following command aws ec2 run-instances --image-id ami-0947d2ba12ee1ff75 --instance-type t2.micro --security-group-ids sg-d01642ef --key-name awseducate
Step3 : Creation of volume by using following command aws ec2 create-volume --size 1 --availability-zone us-east-1a
we can see the volume created in the AWS console of 1 GB and in the attachment region it has not still attached to any instance
Step 4 Now we have to attach the volume to the instance we have created first by using command aws ec2 attach-volume --device /dev/sdf --instance-id i-0faeb36ccba0fdf8a --volume-id vol-01ffc336c0a1b7c6d
Finally we can see that the volume which we launched seperately has been attached to instance which we have passed
As all this commands are executed from AWS CLI