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.

asked a year ago356 views
2 Answers
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
answered a year ago
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
answered a year 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