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

feita há 8 meses220 visualizações
1 Resposta
1
Resposta aceita

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
ESPECIALISTA
respondido há 8 meses
profile pictureAWS
ESPECIALISTA
avaliado há 8 meses
  • 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.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas