in CBHelper-notify/lambda_function.py [0:0]
def lambda_handler(event, context):
CONFIG_SECRET= os.environ['CONFIG_SECRET']
connect_config=json.loads(get_config(CONFIG_SECRET))
region = connect_config['PP_REGION']
originationNumber =connect_config['PP_ORIGINATING_NUMBER']
applicationId=connect_config['PP_PROJECT_ID']
wakeTime = str(event['Details']['ContactData']['Attributes']['wakeTime'])
contactPhone = str(event['Details']['ContactData']['CustomerEndpoint']['Address'])
message = ("We will call back by: " + wakeTime + " at:" + contactPhone)
response = sendNotification(message, originationNumber,contactPhone,applicationId,region)
return {
'statusCode': 200,
'body': json.dumps(response)
}