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
demandé il y a 2 ans1065 vues
1 réponse
1
Réponse acceptée

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
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions