- Newest
- Most votes
- Most comments
Based on the information provided, it appears you're encountering an issue with how AWS IoT Core logs shadow operations in CloudWatch.
The behavior you're describing does seem unusual. When accessing a named shadow through the IoT Core console, the CloudWatch logs should correctly identify the shadow name in the deviceShadowName field, not the thing name.
In AWS IoT, there are two types of shadows: unnamed (classic) shadows and named shadows. A thing can have multiple named shadows but only one unnamed shadow. When working with named shadows, the shadow name should be properly reflected in logs and API calls.
For named shadows, the system requires that the shadow be created first before it can be accessed. This is typically done by publishing an update to the shadow with the specific shadow name. The fact that your AWS CLI command works confirms that the named shadow exists and is accessible.
The issue you're experiencing might be related to how the console is making the API call to retrieve the shadow information. While the console UI correctly displays the shadow content, it appears the logging mechanism might be incorrectly recording the thing name instead of the shadow name in the CloudWatch logs.
This could indeed be a bug in the AWS IoT Core console's logging implementation. Since you've verified that the shadow exists and is accessible via CLI, and the console is correctly displaying the shadow content despite the error logs, this suggests an inconsistency in how the operation is being logged rather than an actual failure to access the shadow.
As a workaround, you might want to continue using the AWS CLI or SDK for any critical shadow operations where you need accurate logging. For monitoring and debugging purposes, you could also implement your own logging mechanism that clearly identifies the shadow names being accessed.
I'd recommend reporting this issue to AWS Support so they can investigate the discrepancy between the console's behavior and the CloudWatch logs.
Sources
AWS IoT Device Shadow service - AWS IoT Core
Using shadows in devices - AWS IoT Core
answered a year ago
Relevant content
asked 3 years ago
asked a year ago
