A device shadow remains useful when equipment is offline, but that is also why it must not be mistaken for a live sensor reading. AWS's shadow document model distinguishes desired, reported and delta state.
For the AWS IoT Core integration, show the age of reported data and test a desired-state change during disconnection. On reconnect, verify the device's actual response before presenting the requested setting as applied.