| Did this page help you? Yes No Tell us about it... |
Attaches an Amazon EBS volume to a running instance and exposes it as the specified device.
![]() | Note |
|---|---|
Windows instances currently support devices xvda through xvdp. Device xvda is assigned to drive C:\, and, depending on the instance type, devices xvdb through xvde might be reserved by the ephemeral stores. Any device that is not reserved can be attached to an Amazon EBS volume. |
| Name | Description | Required |
|---|---|---|
|
|
The ID of the Amazon EBS volume. The volume and instance must be within the same Availability Zone and the instance must be running. Type: String Default: None |
Yes |
|
|
The ID of the instance to which the volume attaches. The volume and instance must be within the same Availability Zone and the instance must be running. Type: String Default: None |
Yes |
|
|
How the device is exposed to the instance (e.g., /dev/sdh, or xvdh). Type: String Default: None |
Yes |
The elements in the following table are wrapped in an
AttachVolumeResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
The ID of the volume. Type: xsd:string |
|
|
The ID of the instance. Type: xsd:string |
|
|
The device as it is exposed to the instance (e.g., /dev/sdh, or xvdh). Type: xsd:string |
|
|
Volume state. Type: xsd:string Valid Values: |
|
|
Time stamp when the attachment initiated. Type: xsd:dateTime |
This example attaches volume vol-4d826724 to instance
i-6058a509 and exposes it as /dev/sdh. For
information on standard storage locations, go to the Amazon Elastic Compute Cloud User Guide.
https://ec2.amazonaws.com/?Action=AttachVolume &VolumeId=vol-4d826724 &InstanceId=i-6058a509 &Device=/dev/sdh &AUTHPARAMS
<AttachVolumeResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <volumeId>vol-4d826724</volumeId> <instanceId>i-6058a509</instanceId> <device>/dev/sdh</device> <status>attaching</status> <attachTime>2008-05-07T11:51:50.000Z</attachTime> </AttachVolumeResponse>