scripts/testConnection.py [10:25]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        print ('This is a %s event' %(event['RequestType']))
        print('Checking connection for Source .....')
        source_result = check_connection(source_endpoint,replication_inst)
        print('Source result was %s' %(source_result))
        if 'success' in source_result:
            print('Proceeding to check connection for Target ....')
            target_result = check_connection(target_endpoint,replication_inst)
            print('Target result was %s' %(target_result))
            if 'success' in target_result:
                cfnresponse.send(event, context, cfnresponse.SUCCESS, {}, '')
            else:
                print('Target connection failed')
                cfnresponse.send(event, context, cfnresponse.FAILED, {}, '')
        else:
            print('Source connection failed')
            cfnresponse.send(event, context, cfnresponse.FAILED, {}, '')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/dms-automation-code-pipeline.template.yaml [780:795]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    print ('This is a %s event' %(event['RequestType']))
                    print('Checking connection for Source .....')
                    source_result = check_connection(source_endpoint,replication_inst)
                    print('Source result was %s' %(source_result))
                    if 'success' in source_result:
                        print('Proceeding to check connection for Target ....')
                        target_result = check_connection(target_endpoint,replication_inst)
                        print('Target result was %s' %(target_result))
                        if 'success' in target_result:
                            cfnresponse.send(event, context, cfnresponse.SUCCESS, {}, '')
                        else:
                            print('Target connection failed')
                            cfnresponse.send(event, context, cfnresponse.FAILED, {}, '')
                    else:
                        print('Source connection failed')
                        cfnresponse.send(event, context, cfnresponse.FAILED, {}, '')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



