Configure AWS EC2 using AWS CLI
Mar 20, 2021
🔅Task description:
- Create a key pair
2. Create a security group
3. Launch an instance using the above
created key pair and security group.
4. Create an EBS volume of 1 GB.
5. The final step is to attach the
above created EBS volume to the
instance you created in the previous steps.
First of all configure aws cli using aws configure command :
- Create key pair:
#aws ec2 create-key-pair --key-name myclikey
2. Create security group:
Use following command to create security group:
3. Authorize the security group :
Adding ingress rules for ssh to do remote login to the instance.
4.Launch instance:
Launching instance using previously created key pair and security group.
5. Create and Attach EBS volume:
Creating the volume of 1 GB size in the same availability zone as instance.
Thank you!