Organizing Greengrass Cores and Lambdas

0

Successfully deployed my first GG group, with one GG core a lambda, a local resource (USB0) and rules to handle the message queue. Quite pleased. It is measuring local seismic activity.

This was just 1 site out of 10 sites. Now starting to add my second core that will perform the exact same functions and many questions arise on how to organize things:

  1. I have only one core per site. I guessed I needed to use groups to enable lambda's. As such, one site has one group has one core. Is that correct?

  2. These 10 form a functional group of measurements. How to organize those? I cannot find hierarchy of some kind. And groups do not seem to allow that hierarchy.

  3. The lambda for each location has the same code, but some parameters differ. E.g. the MQTT topic has the region and site name in it. Also the hardware id of the seismic measuring device is needed by the lambda. My question: If I would call region, site, hwId parameters, how should I make those availalble to the lambda? How should I maintain these?

Thank you, excited to get this to work as intended and scale up to 100s of higher value measurements.

質問済み 5年前159ビュー
2回答
0

Hi jerome68,

Regarding hierarchy, there are cores (exactly 1 core per group), and there are Greengrass aware devices (GGADs). GGADs connect to the cores. There's currently no way to make a group of groups or something like that. Instead you can organize your devices by the MQTT topics, something like topic/region/device . Then you can use the wildcards when setting up subscriptions.

If the Lambda code is the same but you need to pass in some variables you can add Environment variables to the Lambda inside each Greengrass group.

Please let me know if you have any other questions.

Thanks,
Keagen

AWS
KR-AWS
回答済み 5年前
0

That helps, thank you

回答済み 5年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ