There is a brief example how to use GzipFile and TextIOWrapper for reading from a zip file from AWS S3 bucket line-by-line:
from gzip import GzipFile
from io import TextIOWrapper
s3_sync = boto3.client('s3', config=config)
response = s3_sync.get_object(Bucket=bucket_name, Key=s3_key)
response_body = response['Body']
gzipped = GzipFile(None, 'rb', fileobj=response_body)
data = TextIOWrapper(gzipped)
for current_line in data:
lines.append(orjson.loads(current_line))
...
