From 7a744d39f024f3e397b31be9bde51df06943967c Mon Sep 17 00:00:00 2001 From: joern-belonio <54737663+joern-belonio@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:54:35 +0200 Subject: [PATCH] fix(): Source ARN Regex The regex "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9-]+):([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.+)$ has to use\\d{1} instead of d{1} or all arns like eu-central-1 are rejected as invalid. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f254d55..7f832ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -339,7 +339,7 @@ class ServerlessPipes { pipe: string ): void { const arnRegex = new RegExp( - "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9-]+):([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-d{1})?:(d{12})?:(.+)$" + "^arn:(aws[a-zA-Z0-9-]*):([a-zA-Z0-9-]+):([a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1})?:(\\d{12})?:(.+)$" ); if (typeof arn === "object") arn = Object.keys(arn)[0]; if (