KeyLookupOptions

class aws_cdk.aws_kms.KeyLookupOptions(*, alias_name)

Bases: object

Properties for looking up an existing Key.

Parameters:

alias_name (str) – The alias name of the Key.

ExampleMetadata:

infused

Example:

my_key_lookup = kms.Key.from_lookup(self, "MyKeyLookup",
    alias_name="alias/KeyAlias"
)

role = iam.Role(self, "MyRole",
    assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
)
my_key_lookup.grant_encrypt_decrypt(role)

Attributes

alias_name

The alias name of the Key.