Menu
AWS Greengrass
Developer Guide

Configure Long-Lived Lambda Functions for AWS Greengrass

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

  1. In the AWS IoT 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
                                highlighted.
  5. On the Select a Lambda version page, choose Alias: GG_HW_Counter, and then choose Finish.

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

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

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

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

     

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