[bc029c]: / cloudCode / Training / lambda_function.py

Download this file

16 lines (14 with data), 374 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
iimport json
import boto3
import os
import csv
def lambda_handler(event, context):
event['GSR'] = round(event['GSR'],3)
event['BPM'] = round(event['BPM'],3)
client = boto3.client('firehose')
response = client.put_record(
DeliveryStreamName='iotproj_firehose',
Record={
'Data': json.dumps(event)
}
)