IoT Core Rule SQL - Access 'Thing' attribute

1

Hi,

I'd like to enrich messages received by an IoT Core rule with the value of an attribute assigned to the 'Thing' representation of my device, but the only way to do this seems to be to use the aws_lambda SQL function as described here: https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-functions.html#iot-func-aws-lambda, which seems a rather awkward way of accessing information already stored and managed inside of IoT Core.

Is there a better way of accessing 'Thing' attributes within an IoT Core rule SQL statement?

Many thanks.

cgddrd
asked 2 years ago1054 views
1 Answer
1
Accepted Answer

At this time, there's no handy SQL function to retrieve Thing attributes.

If you use a Lambda to call DescribeThing, please be aware also of the service limits that you may hit if processing a lot of messages. The DescribeThing limit is adjustable. However, if you have very heavy load, it may be better to store the attribute information somewhere else (in a shadow, DynamoDB, etc).

profile pictureAWS
EXPERT
Greg_B
answered 2 years ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions