mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
d84099e87a
Co-authored-by: Hugo P.Brito <hugopbrit@gmail.com> Co-authored-by: Hugo Pereira Brito <101209179+HugoPBrito@users.noreply.github.com>
10 lines
405 B
TypeScript
10 lines
405 B
TypeScript
// Uses the AWS Console's universal `/go/view` redirect so we don't have to
|
|
// special-case each service — the console resolves the ARN to the right page.
|
|
export const buildAwsConsoleUrl = (resourceArn: string): string | null => {
|
|
if (!resourceArn || !resourceArn.startsWith("arn:")) {
|
|
return null;
|
|
}
|
|
|
|
return `https://console.aws.amazon.com/go/view?arn=${encodeURIComponent(resourceArn)}`;
|
|
};
|