Greengrass V2 pass data to device during fleet provisioning

0

Hi all,

I'm using greengrass v2 with fleet provisioning to provide thing certificate, now I'd like to pass custom data to the device during the provisioning (like "enviroment:dev|test|prod); In the documentation I saw the provisioning template part called "DeviceConfiguration" (https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html#fleet-provision-template)

So I tried to add it to my template, I created and provisioned a new thing and nothing is happened, the provisioning is worked as usual but no new parameter are passed to the device or I didn't find it.

Is there a way to set or pass arbitrary data to the device during the provisioning process?

Thanks Lorenzo

demandé il y a 8 mois220 vues
1 réponse
1
Réponse acceptée

Hello,

Greengrass fleet provisioning allows you to set templateParameters which are provided to your provisioning template: https://docs.aws.amazon.com/greengrass/v2/developerguide/fleet-provisioning-configuration.html#:~:text=authority%20(CA)%20certificate.-,templateParameters,-(Optional)%20The%20map.

You can create any parameter you want, like environment and then use that parameter in the template with the value that you provide in templateParameters when configuring the fleet provisioning plugin.

Cheers,

Michael

AWS
EXPERT
répondu il y a 8 mois
profile pictureAWS
EXPERT
vérifié il y a 8 mois
  • Thanks for the quick answer, it's clear to me how to map a new parameter in the template but I can't figure out how to access to the parameter on the device? I need to access to that value to differentiate some logic. More in deep in my use case we have created two or three kinesis streams , one for every workload environment (dev,test...) and I need to use the right stream name in the GG component

  • The device does not get the template information. Your components which are interacting with Kinesis or whatever, would need to have their own configuration. In Greengrass, you deploy configuration to devices along with the components.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions