diff --git a/ape_aws/accounts.py b/ape_aws/accounts.py index b79f8e3..8c6ddde 100644 --- a/ape_aws/accounts.py +++ b/ape_aws/accounts.py @@ -38,6 +38,10 @@ class KmsAccount(AccountAPI): key_id: str key_arn: str + @property + def alias(self) -> str: + return self.key_alias.replace("alias/", "") + @property def public_key(self): return kms_client.get_public_key(self.key_id) diff --git a/ape_aws/client.py b/ape_aws/client.py index bbf5638..d40e06b 100644 --- a/ape_aws/client.py +++ b/ape_aws/client.py @@ -88,7 +88,7 @@ def raw_aliases(self) -> list[AliasResponse]: AliasResponse(**page) for alias_data in pages for page in alias_data["Aliases"] - if "alias/aws" not in page["AliasName"] + if "alias/aws/" not in page["AliasName"] ] def get_public_key(self, key_id: str):