Menu
AWS Greengrass
Developer Guide

Create an AWS Greengrass Group

An AWS Greengrass group is a collection of settings for AWS Greengrass cores and the devices that communicate with them. An AWS Greengrass group is composed of a membership list, Lambda function list, and subscription definition. In this scenario, the group consists of your GGC_Thing, RobotArm_Thing, Switch_Thing, your Lambda functions, and a list of the subscriptions between them. Start by creating an AWS Greengrass group. You will add components to it later.

Copy
aws greengrass create-group --name "GreengrassGroupName"

The Greengrass group name is the name that will be displayed in the AWS Greengrass console. It can be changed later, but the ID (generated for you) cannot. The output from the create-group CLI command will look like this:

Copy
{ "LastUpdatedTimestamp": "2017-05-17T17:43:18.815Z", "CreationTimestamp": "2017-05-17T17:43:18.815Z", "Id": "4462f873-9299-440b-a6d6-94cd9560bc6e", "Arn":"arn:aws:greengrass:us-west-2:123451234510:/greengrass/groups/4462f873-9299-440b-a6d6-94cd9560bc6e" "Name":"<GreengrassGroupName>" }

Make a note of the Id in the create-group command output. You will need it later.

To get information about an AWS Greengrass group, you can use the get-group CLI command, passing in the group ID:

Copy
aws greengrass get-group --group-id GroupId

The --group-id argument is the ID that is returned from the create-group CLI command.

The output from the aws greengrass get-group command will look like this:

Copy
{ "LastUpdatedTimestamp": "2017-05-17T17:43:18.815Z", "CreationTimestamp": "2017-05-17T17:43:18.815Z", "Arn":"arn:aws:greengrass:us-west-2:123451234510:/greengrass/groups/4462f873-9299-440b-a6d6-94cd9560bc6e", "Id": "4462f873-9299-440b-a6d6-94cd9560bc6e", "Name": "<GreengrassGroupName>" }

Now that your group has been created, create a core definition, a device definition, a Lambda function definition, and a subscription definition. After these components are created, you will add them to the group and deploy them to your AWS Greengrass core device.