You can now retrieve additional data from DynamoDB tables as part of the rule processing in AWS IoT Core. To do so, simply use the get_dynamodb() function in the SQL statement of your rule, either in the SELECT clause to enrich message payload or in the WHERE clause to evaluate a condition with context from a DynamoDB table of your choice.

from Recent Announcements https://aws.amazon.com/about-aws/whats-new/2019/10/aws-iot-core-adds-ability-to-retrieve-data-from-dynamodb-using-rule-sql/