code: def handler(event, context):
      
      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)
      capture_delete_records(delete_records)
  
      # filter out error events
      update_records = [e for e in update_records if not e['detail'].get('errorCode')]
  
      # group records by account for more efficient processing
      log.debug('Update Records: {records}'.format(records=records))
  
      capture_update_records(update_records)
docs: Historical {{cookiecutter.technology_name}} event collector.
      This collector is responsible for processing Cloudwatch events and polling events.