def send()

in source/lambda/uuid-helper.py [0:0]


def send(event, context, responseStatus, responseData, physicalResourceId=None, noEcho=False): 
    try: 
        responseUrl = event.get('ResponseURL') 
         
        responseBody = { 
            "Status":responseStatus, 
            "Reason": "See the details in CloudWatch Log Stream: " + context.log_stream_name, 
            "PhysicalResourceId": physicalResourceId or context.log_stream_name, 
            "StackId": event.get('StackId'), 
            "RequestId":event.get('RequestId'), 
            "LogicalResourceId": event.get('LogicalResourceId'), 
            "NoEcho": noEcho, 
            "Data": responseData 
        } 
         
        data = json.dumps(responseBody) 
         
        headers = { 
            'content-type' : '', 
            'content-length' : str(len(data)) 
        } 
 
        response = requests.put(responseUrl,data=data,headers=headers) 
        log.debug("CFN Status: " + str(response.status_code))
        response.raise_for_status() 
     
    except Exception as e: 
        raise(e)