End of support notice: On October 7th, 2026, Amazon will discontinue support for Amazon IoT Greengrass Version 1. After October 7th, 2026, you will no longer be able to access the Amazon IoT Greengrass V1 resources. For more information, please visit Migrate from Amazon IoT Greengrass Version 1.
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.
-
In the Amazon IoT console, choose your Amazon IoT Greengrass group, and then choose the Client devices tab.
-
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.
-
On the group configuration page, choose Deploy.
-
In your two command-line windows, run the commands from the previous test for the GG_Switch and GG_TrafficLight client devices.
-
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
andGGShadowService.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.