in codes/lambda/custom_iot_thing_group/src/handler.py [0:0]
def create_iot_thing_group(props):
group_name = str(props['ThingGroupName'])
try:
client = boto3.client('iot')
response = client.create_thing_group(
thingGroupName=group_name,
)
print('create_iot_thing_group: success', response)
return response['thingGroupArn']
except Exception as e:
print("create_iot_thing_group: fail", e)
return None