def METHOD_NAME(bucket, key):
    '''Generates log lines'''
    search = Elasticsearch([os.environ['ES_URL']], serializer=SetEncoder())
    out = []
    response = s3.get_object(Bucket=bucket, Key=key)
    with gzip.GzipFile(fileobj=response["Body"]) as handle:
        for line in handle:
            line = line.decode('utf8')
            match = MATCHER.match(line)
            if not match:
                raise line
            thing = {i[0]: i[1](match.group(n+1)) for n, i in enumerate(fields)}
            thing['_index'] = 'sandbox-prod'
            thing['_id'] = hashlib.sha256(line.encode('utf8')).hexdigest()
            if thing['elb_status_code'] == 200:
                for enricher in ENRICHERS:
                    thing.update(enricher(thing))
                out.append(thing)
    logger.debug(f"Sending {len(out)} items to {os.environ['ES_URL']}")
    bulk(search, out, chunk_size=100)