AWS Greengrass
Developer Guide

Add a Subscription to Your Group Definition

AWS Greengrass cores can pass messages between devices, Lambda functions, and AWS using the MQTT protocol. An AWS Greengrass group controls how these components interact using subscriptions that enable more security and predictable interactions. A subscription consists of a source, target, and topic. The source is the originator of the message. The target is the destination of the message. The topic allows you to filter the data that is sent from the source to the target.

  1. In the AWS Greengrass console, find your group, and then select it.

  2. On the group details page, choose Subscriptions.

  3. Choose Add your first Subscription.

  4. Under Select a source, choose your HelloWorld Lambda function.

  5. Under Select a target, choose IoT Cloud.

  6. Choose Next.

  7. A topic filter can be used to control which data is made available for the target. By default, subscriptions use a wildcard topic ("#") and will pass all information from the source to the target. You will now add hello/world as the topic filter for this subscription. In Optional topic filter, type hello/world, and then choose Next.

  8. Choose Finish to confirm and save your subscription.