2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
2
Hi,
please check CloudWatch logs for details about your rule execution (logging must be enabled for AWS IoT Core).
Your payload has temperature and humidity as keys. What is your primary key in DynamoDB? Every primary key identifies every item uniquely. Temperature or humidity can have the same value over time and cannot be considered to be unique.
To generate a unique key from your SQL statement you could use something like
SELECT newuuid() as prim_key, * FROM 'mytopic'
Cheers,
Philipp
0
I added the variable "Time" to my message and set it as my partition key and finally I have data in my table.
답변함 2년 전
관련 콘텐츠
- 질문됨 12일 전
- AWS 공식업데이트됨 3년 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 일 년 전
I configured IoT to be monitored on CloudWatch and I didn't find any errors.
I changed the as suggested, SQL: SELECT newuuid() as prim_key, *
but still no items identified in the table.
I'm using dynamodbv2.
Hi. How to enable logging: https://docs.aws.amazon.com/iot/latest/developerguide/configure-logging.html. This will then create log streams in a CloudWatch log group called AWSIoTLogsV2. Rule execution logs you should see: https://docs.aws.amazon.com/iot/latest/developerguide/cwl-format.html#log-rules-rule-ex.
This tutorial should steer you in the right direction for the rule, payload enrichment and DynamoDB (even though it's the V1 action, the principles are similar): https://docs.aws.amazon.com/iot/latest/developerguide/iot-ddb-rule.html
What is the primary key of you DynamoDB table? Do you see in CloudWatch that your rule is triggered? If yes, what is the result when the rule is being triggered?
I created a group of logs as suggested, I didn't see any occurrence, I added the variable "Tempo" and set it as my primary key and apparently it solved my problem, thank you all for your attention, very grateful to you.