From 3a4ceb22f40b1ecbcb5c957fb0ac202d70c074d2 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 7 Jul 2025 16:10:06 +0200 Subject: [PATCH] initial aws types --- src/aws/types.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/aws/types.d.ts diff --git a/src/aws/types.d.ts b/src/aws/types.d.ts new file mode 100644 index 0000000..d0fd08d --- /dev/null +++ b/src/aws/types.d.ts @@ -0,0 +1,16 @@ +type AccountId = `${number}`; +type Region = `${string}-${string}-${number}`; + +type Arn< + S extends string, + R extends Region | "", + T extends string +> = `arn:aws:${S}:${R}:${AccountId}:${T}`; + +type RegionalArn = Arn; +type GlobalArn = Arn; + +type RuleArn = RegionalArn<"events", `rule/${string}/${string}`>; +type RoleArn = GlobalArn<"iam", `role/${string}`>; +type SqsArn = RegionalArn<"sqs", string>; +type LambdaArn = RegionalArn<"lambda", `function:${string}`>;