In AWS IoT, "Device" and "Thing Shadow" are two related but functionally distinct concepts.
Device
In AWS IoT, Device typically refers to physical devices or software connected to the AWS IoT platform. These devices can be various IoT devices, such as sensors, smart bulbs, security cameras, etc. These devices communicate with the AWS IoT Core service over the internet, sending data (e.g., sensor readings) or receiving instructions from the cloud.
Example: For instance, in a smart farm management system, a soil moisture sensor device periodically sends soil humidity data to AWS IoT Core for monitoring and analysis.
Thing Shadow
Thing Shadow is a virtual representation of a device provided by AWS IoT. It allows users to view the last reported state of a device and change its expected/target state through the Thing Shadow. Even if the device is currently offline, the Thing Shadow can receive and store these expected states. When the device comes back online, it retrieves the latest state information from the Thing Shadow and adjusts accordingly.
Example: Consider a smart lighting system. When a smart bulb is temporarily offline due to network issues, users can still set the expected brightness via a mobile app. This setting is saved in the bulb's Thing Shadow. When the bulb reconnects to the network, it checks its Thing Shadow, retrieves the latest expected brightness setting, and adjusts the brightness to match this setting.
Summary
Overall, Device refers to the actual physical or virtual device that communicates directly with AWS IoT Core, while Thing Shadow is a virtual representation used in AWS IoT to store and manage device states. Thing Shadow is particularly useful for handling device offline/online states, ensuring state synchronization and eventual consistency.