---
title: "Replaying AWS Kinesis | Speedscale Docs"
description: "Record, mock and replay Amazon Kinesis Data Streams traffic as ordinary HTTP calls with Speedscale and proxymock, and check what a producer sends with the httpOutput assertion."
canonical: "https://docs.speedscale.com/guides/message-brokers/aws-kinesis/"
---

[Documentation index](https://docs.speedscale.com/guides/llms.txt) | [Markdown](https://docs.speedscale.com/guides/message-brokers/aws-kinesis/index.md) | [Canonical page](https://docs.speedscale.com/guides/message-brokers/aws-kinesis/)

# Replaying AWS Kinesis

<a id="background"></a>

## Background

Amazon Kinesis Data Streams has an HTTPS API, so Speedscale records Kinesis calls as ordinary HTTP calls and replays and mocks them like any other API. Kinesis has no Kafka-compatible API; apps that use a Kafka client talk to a Kafka service such as Amazon MSK, which Speedscale records as [Kafka](https://docs.speedscale.com/guides/message-brokers/kafka/).

For more information about Amazon Kinesis Data Streams, see the [Amazon Kinesis Data Streams documentation](https://aws.amazon.com/kinesis/data-streams/).

<a id="what-is-recorded"></a>

## What is recorded

*   **A producer** sends `PutRecord` or `PutRecords`, with each record's data, base64 encoded in a JSON request, and its partition key.
*   **A polling consumer** calls `GetShardIterator` and then `GetRecords`, and each response holds the records it returned.

Some SDKs, such as the AWS SDK for Java, send Kinesis requests as CBOR instead of JSON by default.

Record it like any HTTPS dependency. In Kubernetes, the sidecar records the calls once it decrypts outbound TLS, and the [eBPF collector](https://docs.speedscale.com/reference/ebpf-traffic-collection/) reads them without TLS interception. Locally, run your app with `proxymock record` and set `HTTPS_PROXY` and the proxymock CA as the [language reference](https://docs.speedscale.com/proxymock/getting-started/language-reference/) shows for your runtime.

<a id="mock-and-replay"></a>

## Mock and replay

Your app's calls to the service are outbound, so a replay answers them from the recording, like any other API your app calls. A polling consumer's `GetRecords` calls get the recorded responses, so it receives the recorded records with no stream behind it.

*   To run your app without the service, [create a snapshot](https://docs.speedscale.com/guides/creating-a-snapshot/) and run a [standard replay](https://docs.speedscale.com/quick-start/), or mock the service locally with [`proxymock mock`](https://docs.speedscale.com/proxymock/getting-started/quickstart/quickstart-cli/).
*   To check what a producer sent, add the [`httpOutput`](https://docs.speedscale.com/reference/configuration/assertions/httpoutput/) assertion, which compares the app's outbound calls with the recording field by field.
*   The [message broker overview](https://docs.speedscale.com/proxymock/message-brokers/) compares this with the brokers Speedscale speaks natively.

<a id="write-your-own-load-driver"></a>

## Write your own load driver

To publish the recorded messages to the service yourself, with your own pacing, extract them from a snapshot and send them with a small producer. [Write your own load driver](https://docs.speedscale.com/proxymock/message-brokers/write-your-own-load-driver/#kinesis) has the extraction path and producer code in Go, Java, TypeScript and Python.
