- Newest
- Most votes
- Most comments
Its not clear from your question, but I believe you are calling PutItem
with only select attributes, as PutItem
is a complete overwrite of your data, you are deleting other attributes which you wish to maintain.
PutItem docs.
To overcome that, you should use UpdateItem
which will only update the attributed given in the payload. Furthermore, if the item does not exist it will act like a PutItem
and write the new item.
UpdateItem docs.
Hi,
I assume that you are using one of the AWS IoT Core DynamoDB actions in a rule. Both actions use PutItem
hence the behavior you observe. As Leeroy mentions, UpdateItem
should be used, but you will need to pass the message to a Lambda function first.
An alternative is to use a WHERE
clause in the rule to only execute the rule if the string is not empty.
Massimiliano
Relevant content
- Accepted Answerasked 7 months ago
- asked a year ago
- Accepted Answerasked 5 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a month ago