Skip to content

Produce records

Progress checklist

After the channel
Delivery channel created with create-channel. The console labels the same resource S3 general purpose delivery.
is ACTIVE, feed the stream. The default path is a cheap always-on heartbeat: EventBridge → Lambda PutRecord every few minutes. An optional burst uses amazon-kinesis-replay for higher volume (NYC TLC taxi sample).

There is no backfill — records written before ACTIVE never land in S3. Delivery does not consume the stream’s read throughput.

EventBridge (rate) → Lambda PutRecord → Kinesis stream → channel → S3
optional: amazon-kinesis-replay burst

Reuse the same exports as IAM and delivery (LAB_SUFFIX, STREAM_ARN, CHANNEL_ARN, …). Run from the repo root. Generated files go under .lab/producer/ (gitignored).

  1. Confirm the channel is ACTIVE.

    Terminal window
    aws kinesis describe-channel \
    --channel-arn "$CHANNEL_ARN" \
    --query 'ChannelDescription.ChannelStatus'

    Looks like:

    "ACTIVE"
  2. Start the default always-on heartbeat (or the wrapper).

    Terminal window
    ./scripts/demo.sh producer

    Creates a Lambda (128 MB), IAM role, and EventBridge rule rate(5 minutes) (override with PRODUCER_RATE='rate(1 minute)'). Invokes once immediately so you need not wait for the first schedule tick.

    Looks like (verified in ap-southeast-2, CLI 2.36.38):

    Immediate invoke result: {"ok": true}
    Always-on producer is running.
    Function: kds-s3-demo-LAB_SUFFIX-producer
    Rule: kds-s3-demo-LAB_SUFFIX-producer-schedule (rate(5 minutes))
    Stream: arn:aws:kinesis:ap-southeast-2:ACCOUNT_ID:stream/kds-s3-demo-LAB_SUFFIX-stream
  3. Optional — burst higher volume with the replay JAR (does not replace the heartbeat).

    Terminal window
    ./scripts/demo.sh replay

    Or manually (takes -streamArn, not -streamName):

    Terminal window
    java -jar amazon-kinesis-replay.jar \
    -streamArn "$STREAM_ARN" \
    -speedup 60

    Stop the JAR with Ctrl+C when you have enough traffic. Leave the schedule running until tear down.

Terminal window
aws events describe-rule \
--name "kds-s3-demo-${LAB_SUFFIX}-producer-schedule" \
--query '{Name:Name,State:State,Schedule:ScheduleExpression}'
aws logs tail "/aws/lambda/kds-s3-demo-${LAB_SUFFIX}-producer" --since 15m --format short

Looks like (verified):

{
"Name": "kds-s3-demo-LAB_SUFFIX-producer-schedule",
"State": "ENABLED",
"Schedule": "rate(5 minutes)"
}
INIT_START Runtime Version: python:3.14.…
START RequestId: …
END RequestId: …
REPORT RequestId: … Duration: … Memory Size: 128 MB …

Objects in S3 appear only after the freshness window
Buffer window before records land in S3. DataFreshnessInSeconds accepts 300–900 seconds (5–15 minutes); default 300.
(default 300 seconds). Continue to Verify in S3.