Interact with device shadows - 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 (PDF).

Interact with device shadows

Greengrass core devices can interact with Amazon IoT device shadows using components. A shadow is a JSON document that stores the current or desired state information for an Amazon IoT thing. Shadows can make a device’s state available to other Amazon IoT Greengrass components whether the device is connected to Amazon IoT or not. Each Amazon IoT device has its own classic, unnamed shadow. You can also create multiple named shadows for each device.

Devices and services can create, update, and delete cloud shadows by using MQTT and the reserved MQTT shadow topics, HTTP using the Device Shadow REST API, and the Amazon CLI for Amazon IoT.

The shadow manager component enables your Greengrass components to create, update, and delete local shadows by using the local shadow service and the local publish/subscribe shadow topics. The shadow manager also manages the storage of these local shadow documents on your core device, and handles the synchronization of shadow state information with cloud shadows.

You can also use the shadow manager component to manage local shadows for client devices that connect to the core device. To enable shadow manager to manage client device shadows, you configure the MQTT bridge component to relay messages between the local MQTT broker and the local publish/subscribe service. For more information, see Interact with and sync client device shadows.

For more information about Amazon IoT device shadow concepts, see Amazon IoT Device Shadow service in the Amazon IoT Developer Guide.