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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠