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

posta 8 mesi fa219 visualizzazioni
1 Risposta
1
Risposta accettata

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
ESPERTO
con risposta 8 mesi fa
profile pictureAWS
ESPERTO
verificato 8 mesi fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande