Interact with device shadows - AWS IoT Greengrass

Interact with device shadows

Greengrass core devices can interact with AWS IoT device shadows using components. A shadow is a JSON document that stores the current or desired state information for an AWS IoT thing. Shadows can make a device’s state available to other AWS IoT Greengrass components whether the device is connected to AWS IoT or not. Each AWS 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 AWS CLI for AWS 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 AWS IoT device shadow concepts, see AWS IoT Device Shadow service in the AWS IoT Developer Guide.