code: def capture_update_records(records):
      
      for rec in records:
          data = cloudwatch.get_historical_base_info(rec)
          group = describe_group(rec, cloudwatch.get_region(rec))
  
          if len(group) > 1:
              raise Exception(f'[X] Multiple groups found. Record: {rec}')
  
          if not group:
              LOG.warning(f'[?] No group information found. Record: {rec}')
              continue
  
          group = group[0]
  
          # Determine event data for group - and pop off items that are going to the top-level:
          LOG.debug(f'Processing group. Group: {group}')
          data.update({
              'GroupId': group['GroupId'],
              'GroupName': group.pop('GroupName'),
              'VpcId': group.pop('VpcId', None),
              'arn': get_arn(group.pop('GroupId'), cloudwatch.get_region(rec), group.pop('OwnerId')),
              'Region': cloudwatch.get_region(rec)
          })
  
          data['Tags'] = pull_tag_dict(group)
  
          # Set the remaining items to the configuration:
          data['configuration'] = group
  
          # Set the version:
          data['version'] = VERSION
  
          LOG.debug(f'[+] Writing Dynamodb Record. Records: {data}')
          current_revision = CurrentSecurityGroupModel(**data)
          current_revision.save()
docs: Writes all updated configuration info to DynamoDB