AWS IoT Twin Maker - read data from Entities

0

Am new to IoT Twin Maker. I have an entity that has a component with properties humidity and temperature. Am able to test this component and am getting results successfully. I need to write a Lambda function that will ready this JSON, do a formatting and expose the JSON via REST API. What steps should I follow? Any sample code would help.

I tried creating a lambda function as

response = client.get_property_value( componentName='string', componentTypeId='string', entityId='string', selectedProperties=[ 'string', ], workspaceId='string' )

Am getting the error "An error occurred (ValidationException) when calling the GetPropertyValue operation: No attributePropertyValueReaderByEntity connector defined for a query within entity : <<entityID>> Am sure am missing something, please guide.

demandé il y a un an360 vues
2 réponses
0

Hi,

it seems that the connector you are using does not support get_property_value. You can try if get_property_value_history is working. Not every connector supports necessarily both methods.

Cheers,
Philipp

AWS
EXPERT
répondu il y a un an
0

You may also need to check your component type model: for GetPropertyValue on properties marked as "isStoredExternally": true you should have an attributePropertyValueReaderByEntity definition under the functions in your component type (e.g. instead of "dataReader" in this example)

The lambda function used to implement the above reader should follow this request/response interface: docs

AWS
répondu il y a un an

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