{"record":{"id":"2a775f906853d883","repo":"anomalyco/sst","slug":"the-provided-arn-arn-is-not-a-eventbridge-eve","errorCode":null,"errorMessage":"The provided ARN \"${arn}\" is not a EventBridge event bus ARN.","messagePattern":"The provided ARN \"(.+?)\" is not a EventBridge event bus ARN\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/helpers/arn.ts","lineNumber":97,"sourceCode":"  return { tableName };\n}\n\nexport function parseKinesisStreamArn(streamArn: string) {\n  // ie. \"arn:aws:kinesis:us-east-1:123456789012:stream/MyStream\";\n  const parts = streamArn.split(\":\");\n  const streamName = parts[5]?.split(\"/\")[1];\n  if (parts[0] !== \"arn\" || parts[2] !== \"kinesis\" || !streamName)\n    throw new VisibleError(\n      `The provided ARN \"${streamArn}\" is not a Kinesis stream ARN.`,\n    );\n  return { streamName };\n}\n\nexport function parseEventBusArn(arn: string) {\n  // arn:aws:events:region:account-id:event-bus/bus-name\n  const busName = arn.split(\"/\")[1];\n  if (!arn.startsWith(\"arn:\") || !busName)\n    throw new VisibleError(\n      `The provided ARN \"${arn}\" is not a EventBridge event bus ARN.`,\n    );\n  return { busName };\n}\n\nexport function parseRoleArn(arn: string) {\n  // arn:aws:iam::123456789012:role/MyRole\n  const roleName = arn.split(\"/\")[1];\n  if (!arn.startsWith(\"arn:\") || !roleName)\n    throw new VisibleError(`The provided ARN \"${arn}\" is not an IAM role ARN.`);\n  return { roleName };\n}\n\nexport function parseLambdaEdgeArn(arn: string) {\n  // First validate it's a Lambda function ARN\n  const { functionName } = parseFunctionArn(arn);\n\n  // arn:aws:lambda:region:account-id:function:function-name:version","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/helpers/arn.ts#L79-L115","documentation":"parseEventBusArn validates an EventBridge event bus ARN (arn:aws:events:region:account-id:event-bus/bus-name) and extracts the bus name. It throws a VisibleError when the string lacks 'arn:' or has no '/'-delimited bus name.","triggerScenarios":"Using EventBus.fromEventBusArn (or passing an ARN where a bus is expected) with a bus name, a rule ARN, or a malformed string.","commonSituations":"Passing just the bus name, copying a rule or archive ARN instead of the bus ARN, referencing the default bus with a nonstandard string.","solutions":["Use the full form arn:aws:events:region:account-id:event-bus/bus-name","If you only have the bus name, construct the ARN with region and account ID","For the default bus use `arn:aws:events:${region}:${account}:event-bus/default`"],"exampleFix":"// before\nparseEventBusArn(\"my-bus\");\n// after\nparseEventBusArn(\"arn:aws:events:us-east-1:123456789012:event-bus/my-bus\");","handlingStrategy":"validation","validationCode":"const BUS_ARN = /^arn:aws[a-zA-Z-]*:events:[^:]+:\\d{12}:event-bus\\/[^/]+$/;\nif (!BUS_ARN.test(arn)) throw new Error(`Not an EventBridge bus ARN: ${arn}`);","typeGuard":"function isEventBusArn(v: string): boolean {\n  return /^arn:aws[a-zA-Z-]*:events:[^:]+:\\d{12}:event-bus\\/[^/]+$/.test(v);\n}","tryCatchPattern":"try {\n  const { busName } = parseEventBusArn(arn);\n} catch (e) {\n  throw new Error(`Failed to parse event bus ARN \"${arn}\": ${(e as Error).message}`);\n}","preventionTips":["Use the event-bus/ path form; rule and archive ARNs have different paths","Use sst.aws.Bus.arn when the bus is managed by SST","Remember the service segment is events, not eventbridge"],"tags":["arn","eventbridge","validation","sst"],"backgroundTag":"invalid-arn-format","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}