- 最新
- 投票最多
- 评论最多
Hi,
Thank you for your questions.
For question #1, unfortunately what you described are the only ways to trigger a GG lambda right now. We'll consider what you suggested in the future improvement. If your lambda function doesn't require a specific device to test, a better option to test it in AWS Lambda first before deploying it to Greengrass.
For question #2, what do you mean by "recipe variables"? Are you referring to deployment configuration? You can override the event source during a deployment by updating the "pubsubTopics" field in the default configuration.
For question #3, when you say "create local deployments for Lambda functions", I interpret it as updating your lambda function and deploying it to a GG device using Greengrass CLI https://docs.aws.amazon.com/greengrass/v2/developerguide/gg-cli-deployment.html . Currently Greengrass CLI only supports updating and deploying regular components. Similar to question #1, if your lambda is relatively isolated and doesn't require a specific device to test, I would recommend you to develop and test it in AWS Lambda first.
Hi,
Thank you very much, all my questions were answered.
I can't test in AWS because they have interactions with the device, indeed, including IPC.
For Question #3, that is what I meant yes.
Regarding #2, I did not ask it right. Yes, I was referring to the recipe variables in https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#recipe-variables , but what I actually am looking for is to have IOT_CORE pub/sub topics using variables like the thing name. I understand this is not supported at the moment.
And the solution of having another component subscribing and then triggering the lambda is totally fine.
Thank you once more!
Hi QuantumLove,
For pub/sub topics, you could also pass in a template string and interpolate with the thing name in runtime with environment variables. https://docs.aws.amazon.com/greengrass/v2/developerguide/component-environment-variables.html
Let me know if this works for you.
Thanks,
Hui
Hi Hui,
Thank you for your reply. But this cannot be done on the component recipe, right? Only if I manually subscribe with a pinned Lambda.
I am using non-pinned Lambdas, which would be handy to trigger them from the cloud, using the thing name to distinguish which device I am targetting
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前