Is it possible to assign sort key sing value from payload in IOT Rule?

  Kiến thức lập trình

I have an AWS IOT shadow which receives a JSON that looks like this:
{"value": 10, "timestamp": 230479382}.

The shadow triggers a rule that stores the payload in a DynamoDB database. Its query is SELECT value, timestamp FROM '$aws/things/+/shadow/update'.

The primary key is assigned using ${topic(3)}, and I could assign the sort key using ${timestamp()}, but I want it to accept the timestamp from the payload. Trying to achieve this using ${timestamp} did not work, and all the examples I find online just use ${timestamp}. Is this possible? If so, how?

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website