MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / parse_region_from_arn

Function parse_region_from_arn

scripts/build.py:482–489  ·  view source on GitHub ↗
(arn: str)

Source from the content-addressed store, hash-verified

480
481
482def parse_region_from_arn(arn: str) -> str:
483 # ARN format: arn:partition:service:region:account-id:resource-type/resource-id
484 # Check if we have enough parts and the ARN starts with "arn:"
485 parts = arn.split(":")
486 if len(parts) >= 4:
487 return parts[3]
488
489 return ""
490
491
492def generate_sha(path: pathlib.Path) -> pathlib.Path:

Callers 2

notarize_executableFunction · 0.85
load_gpg_signerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected