By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Is there a way for a greengrass deployment to target a specific thing type within a specific thing group?

0

Currently I have a number of greengrass deployments (declared in yml) where each deployment targets a specific thing group by utilizing the targetArn property. For example:

targetArn: arn:aws:iot:<REGION>:<ID>:thinggroup/PrototypeDevices

Is it possible for me to configure the deployment to target a subset of the devices within the PrototypeDevices thing group that match a certain thing type? Instead of every device in the thing group?

asked 2 months ago61 views
1 Answer
1

Unfortunately, AWS IoT Greengrass deployments do not directly support targeting a specific thing type within a thing group. The deployment target is typically either a single thing (device) or an entire thing group.

However, you can achieve a similar result by using a combination of AWS IoT features and Greengrass deployment strategies:

  1. Create a dynamic thing group: Instead of using your existing static "PrototypeDevices" group, you can create a dynamic thing group that automatically includes devices based on their attributes, including thing type. This way, you can have a group that only contains devices of a specific type within your prototype devices.

  2. Use this dynamic group as your deployment target: Once you have a dynamic group that includes only the devices of the specific type you want to target, you can use this group's ARN as the targetArn in your Greengrass deployment.

For example, you could create a dynamic group that includes all devices of a certain type within your "PrototypeDevices" group, and then use that dynamic group as the target for your deployment.

This approach allows you to effectively target a subset of devices within your original group based on their thing type, without having to manually manage the group membership or create separate deployments for each device type.

Remember to carefully manage your thing attributes and dynamic group queries to ensure you're targeting the correct devices. Also, keep in mind that changes to thing attributes or types will automatically affect group membership and, consequently, your deployments.
Sources
Create deployments - AWS IoT Greengrass
/greengrass/groups/GroupId/deployments - AWS IoT Greengrass

profile picture
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions