- Newest
- Most votes
- Most comments
This timeout is controlled by the lambda's timeoutInSeconds
option which is part of the lambda component configuration. Change it by making a deployment which uses the MERGE operation to update the timeout field with the value you want.
If you make a new version of the lambda component with an updated timeout value then to apply this to your device you must deploy the new version of the lambda component using "RESET": [""]
so that the component will use the new default values in the new component version. https://docs.aws.amazon.com/greengrass/v2/developerguide/update-component-configurations.html#reset-configuration-update
With all this being said, I do not recommend using lambdas for new development. The preferred way to develop for Greengrass V2 is using native components such as shown in this tutorial: https://docs.aws.amazon.com/greengrass/v2/developerguide/defer-component-updates-tutorial.html.
Cheers,
Michael
Ok thank you! That worked. I was putting the timeout into the creation of the component itself - which is created through CloudFormation. I didn't realize that I actually need to put it into the deployment as a merge config.
As for using lambdas vs native components, this is part of our upgrade from Greengrass v1 to v2 and the quickest way for us to move forward seemed to be to just reuse our lambdas that we already have from the v1 setup.
Having said that, we do plan on migrating to native components eventually and briefly looked into that paradigm. One thing that I couldn't figure out though, was how to control a native component to be "on-demand" like a lambda function. Everything I saw seemed to point to native components existing for the lifetime of the deployment without the ability to be instantiated as a result of an event and torn down after processing that event. Can you point me in the right direction to get this type of behavior from a native component?
Thank you!
Relevant content
- asked 4 months ago
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago