AWS Certified Solutions Architect – Associate
Kinesis Data Streams vs Data Firehose: which to use
Kinesis Data Streams holds records for your own consumers to read in real time, typically under a second after they are written, and keeps them for 24 hours by default and up to 365 days so they can be read again. Amazon Data Firehose (formerly Kinesis Data Firehose) needs no consumer code: it buffers records and delivers them to destinations such as S3, Redshift, OpenSearch Service or Splunk. When you need both, point a Firehose stream at the data stream.
Kinesis Data Streams
A data stream is a set of shards. Each shard accepts up to 1,000 records or 1 MB per second of writes, and serves up to 2 MB per second of reads. A partition key decides which shard a record goes to. Records are typically readable less than a second after they are written.
Several applications can read the same stream at the same time and independently, for example one computing aggregates and one archiving to S3. Consumers are usually built with the Kinesis Client Library. Retention defaults to 24 hours and can be raised to 8,760 hours (365 days), at extra cost.
In on-demand mode, Kinesis manages the shards and you pay for the throughput you use. In provisioned mode, you set the shard count and pay per shard per hour.
Data Streams now also has a data delivery feature that copies a stream to general purpose S3 buckets or to Apache Iceberg tables on S3 Tables within minutes, with no consumer to run. Firehose covers far more destinations and adds Lambda transforms and format conversion.
Amazon Data Firehose
Firehose is fully managed delivery. You do not write applications or manage resources. Destinations include Amazon S3, Amazon Redshift, Amazon OpenSearch Service, OpenSearch Serverless, Splunk, Apache Iceberg Tables and HTTP endpoints. For Redshift, Firehose writes to S3 first and then runs a COPY command.
Firehose buffers records until a size or time limit is reached, whichever comes first. For S3 the buffer is 1 to 128 MB (default 5) and 0 to 900 seconds (default 300). A zero-second interval delivers within a few seconds, but it is not available with dynamic partitioning.
Firehose can call a Lambda function to transform records, with up to 5 minutes per invocation. It can convert JSON to Apache Parquet or ORC before writing to S3, using a schema in the AWS Glue Data Catalog. A Firehose stream can read from an existing Kinesis data stream.
Where the exam catches people
- Believing Firehose lets a team read records within milliseconds or replay them: it buffers and delivers; real-time reads and replay come from Data Streams.
- Believing a data stream keeps data for at most 7 days: retention can be raised to 8,760 hours, which is 365 days.
- Believing a Firehose transform can run for 15 minutes because Lambda can: Firehose allows up to 5 minutes per invocation.
- Believing Firehose converts any input to Parquet: it converts JSON, using a schema in the AWS Glue Data Catalog.