Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWS::OpsWorks::Volume

Focus mode
AWS::OpsWorks::Volume - AWS CloudFormation
Filter View

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::OpsWorks::Volume", "Properties" : { "Ec2VolumeId" : String, "MountPoint" : String, "Name" : String, "StackId" : String } }

YAML

Type: AWS::OpsWorks::Volume Properties: Ec2VolumeId: String MountPoint: String Name: String StackId: String

Properties

Ec2VolumeId

The Amazon EC2 volume ID.

Required: Yes

Type: String

Update requires: Replacement

MountPoint

The volume mount point. For example, "/mnt/disk1".

Required: No

Type: String

Update requires: No interruption

Name

The volume name. Volume names are a maximum of 128 characters.

Required: No

Type: String

Update requires: No interruption

StackId

The stack ID.

Required: Yes

Type: String

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the AWS OpsWorks volume ID, such as 1ab23cd4-92ff-4501-b37c-example.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Examples

Template Snippet

The following example registers the ec2volume volume with the opsworksstack stack, both of which are declared elsewhere in the same template.

JSON

"opsworksVolume": { "Type": "AWS::OpsWorks::Volume", "Properties": { "Ec2VolumeId": { "Ref": "ec2volume" }, "MountPoint": "/dev/sdb", "Name": "testOpsWorksVolume", "StackId": { "Ref": "opsworksstack" } } }

YAML

opsworksVolume: Type: AWS::OpsWorks::Volume Properties: Ec2VolumeId: !Ref 'ec2volume' MountPoint: /dev/sdb Name: testOpsWorksVolume StackId: !Ref 'opsworksstack'

See also

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.