Skip to content

Commit

Permalink
fix(): Source ARN Regex
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joern-belonio authored Jul 4, 2024
1 parent b7cd1e1 commit 7a744d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 7a744d3

Please sign in to comment.