def handler(event, context):  # pylint: disable=W0613
    """
    Historical S3 event collector.

    This collector is responsible for processing CloudWatch events and polling events.
    """
    records = deserialize_records(event['Records'])

    # Split records into two groups, update and delete.
    # We don't want to query for deleted records.
    update_records, delete_records = group_records_by_type(records, UPDATE_EVENTS)

    LOG.debug('[@] Processing update records...')
    process_update_records(update_records)
    LOG.debug('[@] Completed processing of update records.')

    LOG.debug('[@] Processing delete records...')
    process_delete_records(delete_records)
    LOG.debug('[@] Completed processing of delete records.')

    LOG.debug('[@] Successfully updated current Historical table')
def handler ( event , context ) : records = deserialize_records ( event [ 'Records' ] ) update_records , delete_records = group_records_by_type ( records , UPDATE_EVENTS ) LOG . debug ( '[@] Processing update records...' ) process_update_records ( update_records ) LOG . debug ( '[@] Completed processing of update records.' ) LOG . debug ( '[@] Processing delete records...' ) process_delete_records ( delete_records ) LOG . debug ( '[@] Completed processing of delete records.' ) LOG . debug ( '[@] Successfully updated current Historical table' )
Historical S3 event collector.

    This collector is responsible for processing CloudWatch events and polling events.