UNPKG

cdk-ssm-secure-iam-access-key

Version:

Creates an IAM Access Key for a provided IAM User and stores the result in an SSM SecureString Parameter

16 lines (15 loc) 497 B
export const parseArn = (value) => { const segments = value.split(":"); if (segments.length < 6) return null; const [arn, partition, service, region, accountId, ...resourceId] = segments; if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") return null; return { partition, service, region, accountId, resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId, }; };