Task : AWS CSA And DEVELOPER Track
AWS Task 1 : Perform Below Operation with AWS CLI
🔅 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.
Solution:
a. Creating Key-Pair
Command : aws ec2 create-key-pair --key-name Test
b. TO describe Key pair
Command : aws ec2 describe-key-pairs
c. TO create an security group for ec2
Command : aws ec2 create-security-group --group-name MySG --description "My SG"
d. To Describe Security Group
Command : aws ec2 describe-security-groups --group-ids sg-0a27ad7342966d9dd
e. TO launch an instance
Command : aws ec2 run-instances --image-id ami-0947d2ba12ee1ff75 --instance-type t2.micro --count 1 --subnet-id subnet-61afd02c --security-group-ids sg-0a27ad7342966d9dd --key-name Test
f. TO create volume
Command : aws ec2 create-volume --availability-zone us-east-1a --volume-type gp2 --size 1
g. To attach a volume
Command : aws ec2 attach-volume --device /dev/sdf --instance-id i-0ee4854d7afd36f7e --volume-id vol-08d216c1309e22ae8
Done!!!!!!!!!!
keep growing