AWS::Greengrass::DeviceDefinitionVersion - AWS CloudFormation


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


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.


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


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


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



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

Required: Yes

Type: String

Update requires: Replacement


The devices in this version.

Required: Yes

Type: Array of Device

Update requires: Replacement

Return values


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.



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.


"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" ] ] } } ] } }


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