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::Greengrass::DeviceDefinitionVersion

Focus mode
AWS::Greengrass::DeviceDefinitionVersion - AWS CloudFormation
Filter View

The AWS::Greengrass::DeviceDefinitionVersion resource represents a device definition version for AWS IoT Greengrass. A device definition version contains a list of devices.

Note

To create a device definition version, you must specify the ID of the device definition that you want to associate with the version. For information about creating a device definition, see AWS::Greengrass::DeviceDefinition.

After you create a device definition version that contains the devices you want to deploy, you must add it to your group version. For more information, see AWS::Greengrass::Group.

Syntax

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

JSON

{ "Type" : "AWS::Greengrass::DeviceDefinitionVersion", "Properties" : { "DeviceDefinitionId" : String, "Devices" : [ Device, ... ] } }

YAML

Type: AWS::Greengrass::DeviceDefinitionVersion Properties: DeviceDefinitionId: String Devices: - Device

Properties

DeviceDefinitionId

The ID of the device definition associated with this version. This value is a GUID.

Required: Yes

Type: String

Update requires: Replacement

Devices

The devices in this version.

Required: Yes

Type: Array of Device

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the device definition version, such as arn:aws:greengrass:us-east-1:123456789012:/greengrass/definition/devices/1234a5b6-78cd-901e-2fgh-3i45j6k178l9/versions/9876ac30-4bdb-4f9d-95af-b5fdb66be1a2.

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

Fn::GetAtt

Examples

Device Definition Version Snippet

The following snippet defines device definition and device definition version resources. The device definition version references the device definition and contains a device. This example points to a manually generated device certificate.

For an example of a complete template, see the AWS::Greengrass::Group resource.

JSON

"TestDeviceDefinition": { "Type": "AWS::Greengrass::DeviceDefinition", "Properties": { "Name": "DemoTestDeviceDefinition" } }, "TestDeviceDefinitionVersion": { "Type": "AWS::Greengrass::DeviceDefinitionVersion", "Properties": { "DeviceDefinitionId": { "Fn::GetAtt": [ "TestDeviceDefinition", "Id" ] }, "Devices": [ { "Id": "TestDevice1", "CertificateArn": { "Fn::Join": [ ":", [ "arn:aws:iot", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f" ] ] }, "SyncShadow": "true", "ThingArn": { "Fn::Join": [ ":", [ "arn:aws:iot", { "Ref": "AWS::Region" }, { "Ref": "AWS::AccountId" }, "thing/TestDevice1" ] ] } } ] } }

YAML

TestDeviceDefinition: Type: 'AWS::Greengrass::DeviceDefinition' Properties: Name: DemoTestDeviceDefinition TestDeviceDefinitionVersion: Type: 'AWS::Greengrass::DeviceDefinitionVersion' Properties: DeviceDefinitionId: !GetAtt - TestDeviceDefinition - Id Devices: - Id: TestDevice1 CertificateArn: !Join - ':' - - 'arn:aws:iot' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - >- cert/4db8b7f58d95b7fdb45c38c28a0b1adf6c5f8c03e902de65734935fea83e751f SyncShadow: 'true' ThingArn: !Join - ':' - - 'arn:aws:iot' - !Ref 'AWS::Region' - !Ref 'AWS::AccountId' - thing/TestDevice1

See also

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