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

已提問 8 個月前檢視次數 220 次
1 個回答
1
已接受的答案

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
專家
已回答 8 個月前
profile pictureAWS
專家
已審閱 8 個月前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南