code: def modify_record(durable_model, current_revision, arn, event_time, diff_func):
      
      # We want the newest items first.
      # See: http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html
      items = list(durable_model.query(
          arn,
          (durable_model.eventTime <= event_time),
          scan_index_forward=False,
          limit=1,
          consistent_read=True))
  
      if items:
          latest_revision = items[0]
  
          latest_config = latest_revision._get_json()[1]['attributes']    # pylint: disable=W0212
          current_config = current_revision._get_json()[1]['attributes']  # pylint: disable=W0212
  
          # Determine if there is truly a difference, disregarding Ephemeral Paths
          diff = diff_func(latest_config, current_config)
          if diff:
              LOG.debug(
                  f'[~] Difference found saving new revision to durable table. Arn: {arn} LatestConfig: {latest_config} '
                  f'CurrentConfig: {json.dumps(current_config)}')
              current_revision.save()
      else:
          current_revision.save()
          LOG.info(f'[?] Got modify event but no current revision found. Arn: {arn}')
docs: Handles a DynamoDB MODIFY event type.