Hello guys,
I am new to AWS. I was trying to take data from my Aws IOT core to AWS twin maker via Lambda function. I have been using this python code :
import json
import boto3
iot_twin_maker_client = boto3.client('iottwinmaker')
def lambda_handler(event, context):
# Extract event data
event_data = json.loads(event[1])
print("temp"+event)
# Send event data to IoT Twin Maker
iot_twin_maker_client.update_property_value(
workspaceId='robot',
entityId='Hand',
propertyId='Rotation',
value=json.dumps(event_data)
)
return {
'statusCode': 200,
'body': json.dumps('Event data sent to IoT Twin Maker.')
}
This particular code shows error in the update_property_value part.
That is: [ERROR] AttributeError: 'IoTTwinMaker' object has no attribute 'update_property_value' Traceback (most recent call last): File "/var/task/lambda_function.py", line 12, in lambda_handler iot_twin_maker_client.updatepropertyvalue( File "/var/lang/lib/python3.11/site-packages/botocore/client.py", line 887, in getattr raise AttributeError(
Is there any solve to this? Also what will be the Json code to receive these data in AWS Iot Twin Maker?
What error does it give?
Attribute error. I am pasting the whole message here: [ERROR] AttributeError: 'IoTTwinMaker' object has no attribute 'update_property_value' Traceback (most recent call last): File "/var/task/lambda_function.py", line 12, in lambda_handler iot_twin_maker_client.updatepropertyvalue( File "/var/lang/lib/python3.11/site-packages/botocore/client.py", line 887, in getattr raise AttributeError(