Tuesday, 24 January 2017

Create EBS Volume and attach it to client

To Create an extra EBS Volume I ran the below command.
root@devops-test:~# aws ec2 create-volume --size 1 --region eu-central-1 --availability-zone eu-
central-1a --volume-type gp2

Found out availability zone and other details using below command:
root@devops-test:~# curl http://169.254.169.254/latest/meta-data/ adding appropriate keywords at the end of the command. For example, if I need to find instance-id, I will query
using curl http://169.254.169.254/latest/meta-data/instance-id

Attaching volume to AWS Client:
root@devops-test:~# aws ec2-attach-volume --volume-id vol-0b991fe06085ee22a --region eu-
central-1 --instance-id i-047c048c06938669e --device /dev/xvde

No comments:

Post a Comment