AWSConfig/CloudEndureCheckReplication/lambda_function/CloudEndureReplicationCheck.py [161:180]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                            backlog = 0

                            if 'backloggedStorageBytes' in machine['replicationInfo']:		
                                if machine['replicationInfo']['backloggedStorageBytes'] > 0:
                                    return ['FAILED', 'Backlogged bytes is higher than 0']
                
                            now = datetime.datetime.now()
                            now_minus_10 = now - datetime.timedelta(minutes = 10)
                            current = now_minus_10.strftime("%Y-%m-%dT%H:%M:%S")
                            if 'lastConsistencyDateTime' in machine['replicationInfo']:
                                if machine['replicationInfo']['lastConsistencyDateTime'] < current:
                                    return ['FAILED', 'Communication with Source machine lost']
                            

                            if 'lastConsistencyDateTime' not in machine['replicationInfo']:
                                return ['FAILED', 'Last consistency date does not exist or system still replicating']
                            if 'lastTestLaunchDateTime' not in machine['lifeCycle']:
                                return ['FAILED', 'Machine has not been tested']
                            return ['PASSED', 'Replication enabled and consistent ']
                        machines = True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



AWSConfig/CloudEndureCheckReplication/lambda_function/CloudEndureReplicationCheck.py [184:203]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                            backlog = 0

                            if 'backloggedStorageBytes' in machine['replicationInfo']:		
                                if machine['replicationInfo']['backloggedStorageBytes'] > 0:
                                    return ['FAILED', 'Backlogged bytes is higher than 0']
                    
                            now = datetime.datetime.now()
                            now_minus_10 = now - datetime.timedelta(minutes = 10)
                            current = now_minus_10.strftime("%Y-%m-%dT%H:%M:%S")
                            if 'lastConsistencyDateTime' in machine['replicationInfo']:
                                if machine['replicationInfo']['lastConsistencyDateTime'] < current:
                                    return ['FAILED', 'Communication with Source machine lost']
            
                
                            if 'lastConsistencyDateTime' not in machine['replicationInfo']:
                                return ['FAILED', 'Last consistency date does not exist or system still replicating']
                            if 'lastTestLaunchDateTime' not in machine['lifeCycle']:
                                return ['FAILED', 'Machine has not been tested']
                            return ['PASSED', 'Replication enabled and consistent ']
                        machines = True
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



