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
preguntada hace 2 años1065 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
EXPERTO
Greg_B
respondido hace 2 años
profile picture
EXPERTO
revisado hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas