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,260 points
528 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,460 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,460 points
902 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,170 points
1,630 views
+1 vote
2 answers

How to create an EC2 instance in AWS Console?

Here is a step by step guide ...READ MORE

answered Feb 11, 2019 in AWS by Shubendu
2,180 views
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,460 points
606 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,460 points
1,893 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP