Write parquet from AWS Kinesis firehose to AWS S3
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Writing Parquet to S3 from Firehose is not about uploading a .parquet file manually. The usual pattern is to send structured records into a delivery stream, enable Firehose data format conversion, and let Firehose buffer, transform, and write Parquet objects into S3.
The Core Requirements
For Firehose to convert records to Parquet, you usually need three things aligned:
- Incoming records in a structured format, often JSON.
- A schema Firehose can use for conversion.
- An S3 destination with data format conversion enabled.
If any of those pieces is missing, Firehose may still deliver data, but not as Parquet.
Why the Schema Matters
Parquet is a typed columnar format. Firehose cannot infer the full structure reliably from random incoming bytes, so it needs a schema definition. In AWS workflows this commonly means using a schema from the Glue Data Catalog.
Conceptually, the flow is:
- Producers send JSON records.
- Firehose buffers the records.
- Firehose uses the schema to map fields and types.
- Firehose writes Parquet files to S3.
That is why the setup is more than just choosing an S3 bucket and a file extension.
Example Configuration Shape
The exact infrastructure tool can vary, but the important part is the format-conversion section. A representative delivery-stream configuration looks like this:
The key idea is simple even if the cloud configuration looks long: JSON in, schema lookup, Parquet out.
Record Shape Still Has to Match the Schema
If your incoming JSON does not match the schema, conversion problems follow. That can mean missing fields, wrong data types, or records being routed to an error path depending on the delivery configuration.
For example, if the Glue schema expects:
- '
event_idas string' - '
user_idas string' - '
event_tsas timestamp' - '
amountas double'
then the producers need to send records that actually fit that contract. Firehose is not a substitute for upstream schema discipline.
Producers Can Send Data Directly
If you are using a direct put delivery stream, a producer can send JSON records like this through the SDK:
This shows the producer side of the flow. Firehose still performs the buffering and S3 delivery.
Buffering Affects File Size and Latency
Firehose does not usually write one S3 object per event. It buffers records for a time interval or size threshold first. That is important because Parquet files that are too small are inefficient for analytics, while aggressive buffering increases delivery latency.
So there is a practical tradeoff:
- Larger buffers create fewer, larger Parquet files.
- Smaller buffers reduce latency but may create small-file problems.
Choose based on your analytics pattern, not by guesswork.
Common Pitfalls
- Assuming Firehose can convert arbitrary raw text to Parquet without a usable schema.
- Sending JSON that does not match the Glue schema.
- Ignoring buffering settings and then wondering why files are tiny or delayed.
- Treating file-format conversion as a replacement for upstream data validation.
- Forgetting to configure the correct IAM permissions for S3 and schema access.
Summary
- Firehose can write Parquet to S3 by using data format conversion.
- The normal setup is structured input plus a schema plus an S3 destination.
- Glue schema alignment is central because Parquet is typed.
- Producers still need to send well-formed records that match the schema.
- Buffering settings determine the latency versus file-size tradeoff of the delivered Parquet objects.
Related reading
- Write to two Kafka topics in a single transaction using Spring Kafka
- Writing Custom Kafka Serializer
- Writing JUnit tests for Kafka Consumer
- Writing large DataFrame from PySpark to Kafka runs into timeout
- Writing a pickle file to an s3 bucket in AWS
- You have requested more vCPU capacity than your current vCPU limit of 0
- Writing logs to log file as well as kafka
- WSO2 SP - Kafka source with JSON attributes

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.