aws-cdk-lib.aws_kms.KeyLookupOptions

interface KeyLookupOptions

LanguageType name
.NETAmazon.CDK.AWS.KMS.KeyLookupOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awskms#KeyLookupOptions
Javasoftware.amazon.awscdk.services.kms.KeyLookupOptions
Pythonaws_cdk.aws_kms.KeyLookupOptions
TypeScript (source)aws-cdk-lib » aws_kms » KeyLookupOptions

Properties for looking up an existing Key.

Example

const myKeyLookup = kms.Key.fromLookup(this, 'MyKeyLookup', {
  aliasName: 'alias/KeyAlias',
});

const role = new iam.Role(this, 'MyRole', {
  assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
});
myKeyLookup.grantEncryptDecrypt(role);

Properties

NameTypeDescription
aliasNamestringThe alias name of the Key.

aliasName

Type: string

The alias name of the Key.

Must be in the format alias/<AliasName>.