AWS::EC2::VolumeAttachmentAttaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name. Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains. If an Amazon EBS volume is the root device of an instance, it cannot be detached while t...
4 configurable properties. 2 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
InstanceId | string | RequiredCreate-only |
VolumeId | string | RequiredCreate-only |
Device | string | Create-only |
EbsCardIndex | integer | Create-only |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::VolumeAttachment
Resources:
MyResource:
Type: AWS::EC2::VolumeAttachment
Properties:
VolumeId: "my-volumeid"
InstanceId: "my-instanceid"Permissions CloudFormation needs in your IAM role to manage this resource.
ec2:AttachVolumeec2:DescribeVolumesec2:DescribeVolumesec2:DetachVolumeec2:DescribeVolumesec2:DescribeVolumesEverything you need to know about EC2 on one page. HD quality, print-friendly.
Download Free InfographicVolumeIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
DeviceInstanceIdVolumeIdEbsCardIndex