AWS IoT Greengrass
Developer Guide

Configure Long-Lived Lambda Functions for AWS IoT Greengrass

You are now ready to configure your Lambda function for AWS IoT Greengrass.

  1. In the AWS IoT Core console, under Greengrass, choose Groups, and then choose the group that you created in Module 2.

  2. On the group configuration page, choose Lambdas, and then choose Add Lambda.

  3. On the Add a Lambda to your Greengrass Group page, choose Use existing Lambda.

  4. On the Use existing Lambda page, choose Greengrass_HelloWorld_Counter, and then choose Next.

                            Screenshot with Greengrass_HelloWorld_Counter and the Next button
  5. On the Select a Lambda version page, choose Alias: GG_HW_Counter, and then choose Finish.

  6. On the Lambdas page, from the menu, choose Edit Configuration.

                            Screenshot of the Group Configuration page with Lambdas in the
                                navigation pane and Edit Configuration highlighted.
  7. On the configuration page, edit the following properties:

    • Set Timeout to 25 seconds. This Lambda function sleeps for 20 seconds before each invocation.

    • For Lambda lifecycle, choose Make this function long-lived and keep it running indefinitely.

    • Accept the default values for all other fields, such as Run as and Containerization.


                    Screenshot with the Timeout field set to 25 seconds and the Make this
                        function long-lived and keep it running indefinitely radio button
  8. Choose Update.