in src/lambda/notification_function.py [0:0]
def send_notification(timestamp, camera_ID, s3_path):
# Mar 5, 2019, 8:11:22 PM (GMT)
ftime = timestamp.strftime('%b %-d, %Y, %-I:%M:%S %p (GMT)')
return SNSCLIENT.publish(
TopicArn=SNS_TOPIC,
MessageStructure='json',
Subject=f'Alert: worker without PPE caught on {camera_ID}',
Message=json.dumps({
'default': f'Alert: worker without PPE caught on {s3_path}',
'email': f'Camera: {camera_ID}\nDate: {ftime}\nImage: {s3_path}',
})
)