Name:
interface
Value:
Extend your Amplify Gen 2 app with AWS Blocks — self-contained backend capabilities you compose into your existing backend.
Gen1 DocsLegacy

Page updated Apr 22, 2026

NewDeploy web apps with Git or your AI coding agent using the latest AWS Amplify. Add managed databases and authentication as you grow. Explore the documentation.
NoticeAmplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027.

Kinesis Data Streams

These docs cover Amplify Gen 2. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.

Use the AWS Cloud Development Kit (AWS CDK) to create an Amazon Kinesis Data Stream and grant your app the permissions it needs. For more on adding custom AWS resources to your Amplify backend, see Custom resources.

Set up a Kinesis stream

amplify/backend.ts
import { defineBackend } from "@aws-amplify/backend";
import { auth } from "./auth/resource";
import { data } from "./data/resource";
import { Policy, PolicyStatement } from "aws-cdk-lib/aws-iam";
import { Stream } from "aws-cdk-lib/aws-kinesis";
import { Stack } from "aws-cdk-lib/core";
const backend = defineBackend({
auth,
data,
});
const kinesisStack = backend.createStack("kinesis-stack");
// Create a Kinesis stream
const kinesisStream = new Stream(kinesisStack, "KinesisStream", {
streamName: "myKinesisStream",
shardCount: 1,
});
// Grant PutRecords permission to authenticated users
const kinesisPolicy = new Policy(kinesisStack, "KinesisPolicy", {
statements: [
new PolicyStatement({
actions: ["kinesis:PutRecords"],
resources: [kinesisStream.streamArn],
}),
],
});
backend.auth.resources.authenticatedUserIamRole.attachInlinePolicy(kinesisPolicy);

If you are not using the CDK, ensure your authenticated IAM role has the kinesis:PutRecords permission on your target stream:

{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "kinesis:PutRecords",
"Resource": "arn:aws:kinesis:<region>:<account-id>:stream/<stream-name>"
}]
}

For more information, see the Amazon Kinesis Developer Documentation.

Next steps

Use the Kinesis Data Streams client to stream data from your app.