How to attach a volume to an instance in AWS

0 votes

Hi Team,

I have one instance running in AWS. I want to attach a volume to the instance from the command line. How can I do that?

Nov 5, 2020 in AWS by akhtar
• 38,180 points
65 views

1 answer to this question.

0 votes

Hi@akhtar,

You can attach an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name. The following example command attaches a volume to an instance as /dev/sdf.

$ aws ec2 attach-volume --volume-id vol-1234567890abcdef0 --instance-id i-01474ef662b89480 --device /dev/sdf
answered Nov 5, 2020 by MD
• 95,240 points

Related Questions In AWS

0 votes
1 answer

How to attach a load balancer to an Auto Scaling group in AWS?

Hi@akhtar, You can attach one or more Classic Load ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,240 points
115 views
0 votes
1 answer

How to add IAM role to an existing instance in aws?

As of AWS CLI v1.11.46,  you can ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,150 points
917 views
+1 vote
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to add a role to an instance profile in AWS?

Hi@akhtar, You can add the specified IAM role ...READ MORE

answered Nov 3, 2020 in AWS by MD
• 95,240 points
77 views
0 votes
1 answer

How to attach an instance to an Auto Scaling group in AWS?

Hi@akhtar, You can attach one or more EC2 instances ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,240 points
93 views