anomalyco/sst · error · VisibleError
The provided ARN "${streamArn}" is not a Kinesis stream ARN.
Error message
The provided ARN "${streamArn}" is not a Kinesis stream ARN. What it means
parseKinesisStreamArn validates a Kinesis data stream ARN (arn:aws:kinesis:region:account-id:stream/MyStream) and extracts the stream name. It throws a VisibleError when the service segment is not 'kinesis' or no stream name follows 'stream/'.
Source
Thrown at platform/src/components/aws/helpers/arn.ts:87
}
export function parseDynamoStreamArn(streamArn: string) {
// ie. "arn:aws:dynamodb:us-east-1:112233445566:table/MyTable/stream/2024-02-25T23:17:55.264"
const parts = streamArn.split(":");
const tableName = parts[5]?.split("/")[1];
if (parts[0] !== "arn" || parts[2] !== "dynamodb" || !tableName)
throw new VisibleError(
`The provided ARN "${streamArn}" is not a DynamoDB stream ARN.`,
);
return { tableName };
}
export function parseKinesisStreamArn(streamArn: string) {
// ie. "arn:aws:kinesis:us-east-1:123456789012:stream/MyStream";
const parts = streamArn.split(":");
const streamName = parts[5]?.split("/")[1];
if (parts[0] !== "arn" || parts[2] !== "kinesis" || !streamName)
throw new VisibleError(
`The provided ARN "${streamArn}" is not a Kinesis stream ARN.`,
);
return { streamName };
}
export function parseEventBusArn(arn: string) {
// arn:aws:events:region:account-id:event-bus/bus-name
const busName = arn.split("/")[1];
if (!arn.startsWith("arn:") || !busName)
throw new VisibleError(
`The provided ARN "${arn}" is not a EventBridge event bus ARN.`,
);
return { busName };
}
export function parseRoleArn(arn: string) {
// arn:aws:iam::123456789012:role/MyRole
const roleName = arn.split("/")[1];View on GitHub (pinned to a0bd20f762)
Solutions
- Use the full form arn:aws:kinesis:region:account-id:stream/stream-name
- Copy the ARN from the Kinesis console stream details page
- If using Firehose, note its ARN has delivery-stream/ and is not accepted here
Example fix
// before
parseKinesisStreamArn("my-stream");
// after
parseKinesisStreamArn("arn:aws:kinesis:us-east-1:123456789012:stream/my-stream"); Defensive patterns
Strategy: validation
Validate before calling
const KINESIS_ARN = /^arn:aws[a-zA-Z-]*:kinesis:[^:]+:\d{12}:stream\/[^/]+$/;
if (!KINESIS_ARN.test(arn)) throw new Error(`Not a Kinesis stream ARN: ${arn}`); Type guard
function isKinesisStreamArn(v: string): boolean {
return /^arn:aws[a-zA-Z-]*:kinesis:[^:]+:\d{12}:stream\/[^/]+$/.test(v);
} Try / catch
try {
const { streamName } = parseKinesisStreamArn(streamArn);
} catch (e) {
throw new Error(`Failed to parse Kinesis stream ARN "${streamArn}": ${(e as Error).message}`);
} Prevention
- Ensure the ARN service segment is kinesis (not firehose or analytics)
- Copy the ARN from the Kinesis stream details page, not the name
- Use sst.aws.KinesisStream.arn when the stream is managed by SST
When it happens
Trigger: Subscribing a function to a Kinesis stream by ARN where the string is a stream name, a Firehose delivery stream ARN, or a truncated ARN.
Common situations: Passing just the stream name, using a Kinesis Data Firehose or Data Analytics ARN (wrong service), missing the stream/ prefix segment.
Related errors
- The provided ARN "${arn}" is not a Lambda function ARN.
- The provided ARN "${arn}" is not an S3 bucket ARN.
- The provided ARN "${arn}" is not an SNS Topic ARN.
- The provided ARN "${arn}" is not an SQS Queue ARN.
- The provided ARN "${arn}" is not a DynamoDB table ARN.
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/b264eff6f5ab54f4.
Report an issue: GitHub.