Test communications (device syncs enabled) - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Amazon IoT Greengrass Version 1 no longer receives feature updates, and will receive only security patches and bug fixes until June 30, 2023. For more information, see the Amazon IoT Greengrass V1 maintenance policy. We strongly recommend that you migrate to Amazon IoT Greengrass Version 2, which adds significant new features and support for additional platforms.

Test communications (device syncs enabled)

For this test, you configure the GG_TrafficLight device shadow to sync to Amazon IoT. You run the same commands as in the previous test, but this time the shadow state in the cloud is updated when GG_Switch sends an update request.

  1. In the Amazon IoT console, choose your Amazon IoT Greengrass group, and then choose the Client devices tab.

  2. Select the GG_TrafficLight device, choose Sync shadow, and then choose Enable shadow sync with cloud.

    You should receive a notification that the device shadow sync status was updated.

  3. On the group configuration page, choose Deploy.

  4. In your two command-line windows, run the commands from the previous test for the GG_Switch and GG_TrafficLight client devices.

  5. Now, check the shadow state in the Amazon IoT console. Choose your Amazon IoT Greengrass group, choose the Client devices tab, choose GG_TrafficLight, choose the Device Shadows tab, and then choose Classic Shadow.

    Because you enabled sync of the GG_TrafficLight shadow to Amazon IoT, the shadow state in the cloud should be updated whenever GG_Switch sends an update. This functionality can be used to expose the state of a client device to Amazon IoT.

    Note

    If necessary, you can troubleshoot issues by viewing the Amazon IoT Greengrass core logs, particularly runtime.log:

    cd /greengrass/ggc/var/log sudo cat system/runtime.log | more

    You can also view GGShadowSyncManager.log and GGShadowService.log. For more information, see Troubleshooting Amazon IoT Greengrass.

Keep the client devices and subscriptions set up. You use them in the next module. You also run the same commands.