Skip to content
v2.275.0

AliasProps Struct ​

Construction properties for a KMS Key Alias object.

Example ​

ts
// Passing an encrypted replication bucket created in a different stack.
const app = new App();
const replicationStack = new Stack(app, 'ReplicationStack', {
  env: {
    region: 'us-west-1',
  },
});
const key = new kms.Key(replicationStack, 'ReplicationKey');
const alias = new kms.Alias(replicationStack, 'ReplicationAlias', {
  // aliasName is required
  aliasName: PhysicalName.GENERATE_IF_NEEDED,
  targetKey: key,
});
const replicationBucket = new s3.Bucket(replicationStack, 'ReplicationBucket', {
  bucketName: PhysicalName.GENERATE_IF_NEEDED,
  encryptionKey: alias,
});

Properties ​

aliasNamestringalias_namestraliasNameStringAliasNamestringAliasName*stringrequired#
The name of the alias.

The name must start with alias followed by a forward slash, such as alias/. You can't specify aliases that begin with alias/AWS. These aliases are reserved.

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy#
Policy to apply when the alias is removed from this stack.

Default: The alias will be deleted

targetKeyIKeytarget_keyIKeytargetKeyIKeyTargetKeyIKeyTargetKeyIKeyrequired#
The ID of the key for which you are creating the alias.

Specify the key's globally unique identifier or Amazon Resource Name (ARN). You can't specify another alias.