AWS Greengrass
User Guide

Create a "Hello World" Lambda function

AWS Greengrass cores can run Lambda functions in response to messages sent by your devices (or other Lambda functions). You will now create a Lambda function that you will add to your AWS Greengrass group and then deploy it to your AWS Greengrass core.

  1. From the Service drop-down menu, navigate to the AWS Lambda console.

  2. In the Lambda console, choose Create a Lambda function.

  3. In the Filter text box, type Greengrass, and then choose the greengrass-hello-world Lambda function blueprint.

  4. Choose Next.

  5. For Name, type HelloWorld. For Runtime, choose Python 2.7.

  6. Scroll down until you see Lambda function handler and role. For Role, select Choose an existing role. For Existing role, select any role. If you don't have a role, select Create a new role from template(s), and then choose any template from the Policy templates drop-down list. Choose Next.

  7. On the Review page, choose Create function.

  8. Now you need to publish a new version of the Hello World Lambda function. From the Actions menu, choose Publish new version.

  9. In Version description, type Test, and then choose Publish.