Skip to contents

Attaches an Amazon EBS volume to a running or stopped instance, and exposes it to the instance with the specified device name.

See https://www.paws-r-sdk.com/docs/ec2_attach_volume/ for full documentation.

Usage

ec2_attach_volume(
  Device,
  InstanceId,
  VolumeId,
  EbsCardIndex = NULL,
  DryRun = NULL
)

Arguments

Device

[required] The device name (for example, /dev/sdh or xvdh).

InstanceId

[required] The ID of the instance.

VolumeId

[required] The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

EbsCardIndex

The index of the EBS card. Some instance types support multiple EBS cards. The default EBS card index is 0.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.