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.

asked 5 years ago153 views
2 Answers
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
answered 5 years ago
0

That helps, thank you

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions