AWS Greengrass
Developer Guide

Create AWS IoT Devices in an AWS Greengrass Group

  1. In the AWS IoT console, choose Greengrass, choose Groups, and then choose your group to open its configuration page. Next, choose Devices and then choose Add your first Device.

                            Screenshot of the Devices page with the Add your first Device
                                button highlighted.

    Choose Create New Device:

                            Screenshot of the Add a Device page with the Create New Device
                                button highlighted.

    Register this device as HelloWorld_Publisher, then choose Next:

                            Screenshot of Create a Registry entry for a device with the Name
                                field set to HelloWorld_Publisher and the Next button

    For 1-Click, choose Use Defaults:

                            Screenshot of Set up security with the Use Defaults button

    Create a folder on your computer.

    Download the certificates for your device into the folder, and then decompress them (to decompress tar.gz files on Windows, see the Windows tab in step 2 of Create and Package a Lambda Function).

                            Screenshot of the Download security credentials page with the
                                Download these resources as a tar.gz button highlighted.

    Note the common GUID-like filename component for the HelloWorld_Publisher device (in this example, 51d2737e90), this will be needed later. Finally, choose Finish.

  2. By choosing Add Device, repeat step 1 to add another device to the group and name it HelloWorld_Subscriber. Download the certificates for your second device onto your computer as well, saving them in the same folder as the first set of certificates. Choose Finish. Again, note the common GUID-like filename component for the HelloWorld_Subscriber device.

    You should now have two devices in your AWS Greengrass group:

                            Screenshot showing the HelloWorld_Publisher and
                                HelloWorld_Subscriber devices.
  3. Review the documentation on Server Authentication in AWS IoT Core, follow the links to download the appropriate CA certificate, and then save it as root-ca-cert.pem in the folder you just created. For this module, this certificate and the certificates and keys for both devices should be in one folder on your computer (not on the AWS Greengrass core device).


    If you're using a web browser on the Mac and you receive a This certificate is already installed as a certificate authority alert, you can open a Terminal window and run the following commands to download the certificate into the folder that contains the HelloWorld_Publisher and HelloWorld_Subscriber device certificates and keys:

    cd path-to-folder-containing-device-certificates curl -o ./root-ca-cert.pem

    Run cat root-ca-cert.pem to ensure that the file is not empty. If so, check the URL and try the curl command again.