def is_kendra_sync_running()

in lambda/indexer/common.py [0:0]


def is_kendra_sync_running(dsId, indexId):
    # Check if sync job is still running
    resp = KENDRA.list_data_source_sync_jobs(Id=dsId, IndexId=indexId)
    if ('History' in resp):
        for h in resp['History']:
            if (h['Status'] in ['SYNCING', 'SYNCING_INDEXING']):
                return h['Status']
    return False