We recommend new projects start with resources from the AWS provider.
aws-native.kms.Key
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
The AWS::KMS::Key
resource specifies an KMS key in KMSlong. You can use this resource to create symmetric encryption KMS keys, asymmetric KMS keys for encryption or signing, and symmetric HMAC KMS keys. You can use AWS::KMS::Key
to create multi-Region primary keys of all supported types. To replicate a multi-Region key, use the AWS::KMS::ReplicaKey
resource.
If you change the value of the KeySpec
, KeyUsage
, Origin
, or MultiRegion
properties of an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing any of its immutable property values.
KMS replaced the term customer master key (CMK) with ** and KMS key. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.
You can use symmetric encryption KMS keys to encrypt and decrypt small amounts of data, but they are more commonly used to generate data keys and data key pairs. You can also use a symmetric encryption KMS key to encrypt data stored in AWS services that are integrated with. For more information, see Symmetric encryption KMS keys in the Developer Guide.
You can use asymmetric KMS keys to encrypt and decrypt data or sign messages and verify signatures. To create an asymmetric key, you must specify an asymmetric KeySpec
value and a KeyUsage
value. For details, see Asymmetric keys in in the Developer Guide.
You can use HMAC KMS keys (which are also symmetric keys) to generate and verify hash-based message authentication codes. To create an HMAC key, you must specify an HMAC KeySpec
value and a KeyUsage
value of GENERATE_VERIFY_MAC
. For details, see HMAC keys in in the Developer Guide.
You can also create symmetric encryption, asymmetric, and HMAC multi-Region primary keys. To create a multi-Region primary key, set the MultiRegion
property to true
. For information about multi-Region keys, see Multi-Region keys in in the Developer Guide.
You cannot use the AWS::KMS::Key
resource to specify a KMS key with imported key material or a KMS key in a custom key store.
Regions
KMS CloudFormation resources are available in all Regions in which KMS and CFN are supported. You can use the AWS::KMS::Key
resource to create and manage all KMS key types that are supported in a Region.
Create Key Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Key(name: string, args?: KeyArgs, opts?: CustomResourceOptions);
@overload
def Key(resource_name: str,
args: Optional[KeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Key(resource_name: str,
opts: Optional[ResourceOptions] = None,
bypass_policy_lockout_safety_check: Optional[bool] = None,
description: Optional[str] = None,
enable_key_rotation: Optional[bool] = None,
enabled: Optional[bool] = None,
key_policy: Optional[Any] = None,
key_spec: Optional[KeySpec] = None,
key_usage: Optional[KeyUsage] = None,
multi_region: Optional[bool] = None,
origin: Optional[KeyOrigin] = None,
pending_window_in_days: Optional[int] = None,
rotation_period_in_days: Optional[int] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewKey(ctx *Context, name string, args *KeyArgs, opts ...ResourceOption) (*Key, error)
public Key(string name, KeyArgs? args = null, CustomResourceOptions? opts = null)
type: aws-native:kms:Key
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Key Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Key resource accepts the following input properties:
- Bypass
Policy boolLockout Safety Check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- Description string
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- Enable
Key boolRotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - Enabled bool
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - Key
Policy object The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- Key
Spec Pulumi.Aws Native. Kms. Key Spec Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- Key
Usage Pulumi.Aws Native. Kms. Key Usage - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- Multi
Region bool - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - Origin
Pulumi.
Aws Native. Kms. Key Origin - The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - Pending
Window intIn Days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - Rotation
Period intIn Days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - List<Pulumi.
Aws Native. Inputs. Tag> - Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
- Bypass
Policy boolLockout Safety Check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- Description string
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- Enable
Key boolRotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - Enabled bool
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - Key
Policy interface{} The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- Key
Spec KeySpec Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- Key
Usage KeyUsage - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- Multi
Region bool - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - Origin
Key
Origin - The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - Pending
Window intIn Days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - Rotation
Period intIn Days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - Tag
Args - Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
- bypass
Policy BooleanLockout Safety Check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- description String
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- enable
Key BooleanRotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - enabled Boolean
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - key
Policy Object The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- key
Spec KeySpec Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- key
Usage KeyUsage - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- multi
Region Boolean - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - origin
Key
Origin - The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - pending
Window IntegerIn Days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - rotation
Period IntegerIn Days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - List<Tag>
- Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
- bypass
Policy booleanLockout Safety Check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- description string
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- enable
Key booleanRotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - enabled boolean
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - key
Policy any The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- key
Spec KeySpec Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- key
Usage KeyUsage - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- multi
Region boolean - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - origin
Key
Origin - The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - pending
Window numberIn Days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - rotation
Period numberIn Days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - Tag[]
- Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
- bypass_
policy_ boollockout_ safety_ check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- description str
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- enable_
key_ boolrotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - enabled bool
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - key_
policy Any The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- key_
spec KeySpec Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- key_
usage KeyUsage - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- multi_
region bool - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - origin
Key
Origin - The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - pending_
window_ intin_ days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - rotation_
period_ intin_ days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - Sequence[Tag
Args] - Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
- bypass
Policy BooleanLockout Safety Check - Skips ("bypasses") the key policy lockout safety check. The default value is false. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, see Default key policy in the Developer Guide. Use this parameter only when you intend to prevent the principal that is making the request from making a subsequent PutKeyPolicy request on the KMS key.
- description String
- A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
- enable
Key BooleanRotation - Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled.
KMS supports automatic rotation only for symmetric encryption KMS keys (
KeySpec
=SYMMETRIC_DEFAULT
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with OriginEXTERNAL
, omit theEnableKeyRotation
property or set it tofalse
. To enable automatic key rotation of the key material for a multi-Region KMS key, setEnableKeyRotation
totrue
on the primary key (created by usingAWS::KMS::Key
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide. - enabled Boolean
- Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations.
When
Enabled
istrue
, the key state of the KMS key isEnabled
. WhenEnabled
isfalse
, the key state of the KMS key isDisabled
. The default value istrue
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide. - key
Policy Any The key policy to attach to the KMS key. If you provide a key policy, it must meet the following criteria:
- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
BypassPolicyLockoutSafetyCheck
to true.) - Each statement in the key policy must contain one or more principals. The principals in the key policy must exist and be visible to KMS. When you create a new AWS principal (for example, an IAM user or role), you might need to enforce a delay before including the new principal in a key policy because the new principal might not be immediately visible to KMS. For more information, see Changes that I make are not always immediately visible in the User Guide.
If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For more information, see Default key policy in the Developer Guide. A key policy document can include only the following characters:
- Printable ASCII characters
- Printable characters in the Basic Latin and Latin-1 Supplement character set
- The tab (
\u0009
), line feed (\u000A
), and carriage return (\u000D
) special characters
Minimum:
1
Maximum:32768
Search the CloudFormation User Guide for
AWS::KMS::Key
for more information about the expected schema for this property.- The key policy must allow the caller to make a subsequent PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, see Default key policy in the Developer Guide. (To omit this condition, set
- key
Spec "SYMMETRIC_DEFAULT" | "RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2" Specifies the type of KMS key to create. The default value,
SYMMETRIC_DEFAULT
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions,SYMMETRIC_DEFAULT
creates a 128-bit symmetric key that uses SM4 encryption. You can't change theKeySpec
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. TheKeySpec
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of theKeySpec
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:Symmetric encryption key (default)
SYMMETRIC_DEFAULT
(AES-256-GCM)HMAC keys (symmetric)
HMAC_224
HMAC_256
HMAC_384
HMAC_512
Asymmetric RSA key pairs (encryption and decryption or signing and verification)
RSA_2048
RSA_3072
RSA_4096
Asymmetric NIST-recommended elliptic curve key pairs (signing and verification or deriving shared secrets)
ECC_NIST_P256
(secp256r1)ECC_NIST_P384
(secp384r1)ECC_NIST_P521
(secp521r1)Other asymmetric elliptic curve key pairs (signing and verification)
ECC_SECG_P256K1
(secp256k1), commonly used for cryptocurrencies.SM2 key pairs (encryption and decryption or signing and verification or deriving shared secrets)
SM2
(China Regions only)
- key
Usage "ENCRYPT_DECRYPT" | "SIGN_VERIFY" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT" - Determines the cryptographic operations for which you can use the KMS key. The default value is
ENCRYPT_DECRYPT
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change theKeyUsage
value after the KMS key is created. If you change the value of theKeyUsage
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.- For symmetric encryption KMS keys, omit the parameter or specify
ENCRYPT_DECRYPT
. - For HMAC KMS keys (symmetric), specify
GENERATE_VERIFY_MAC
. - For asymmetric KMS keys with RSA key pairs, specify
ENCRYPT_DECRYPT
orSIGN_VERIFY
. - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify
SIGN_VERIFY
orKEY_AGREEMENT
. - For asymmetric KMS keys with
ECC_SECG_P256K1
key pairs specifySIGN_VERIFY
. - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
ENCRYPT_DECRYPT
,SIGN_VERIFY
, orKEY_AGREEMENT
.
- For symmetric encryption KMS keys, omit the parameter or specify
- multi
Region Boolean - Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the
MultiRegion
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of theMultiRegion
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property totrue
. For a single-Region key, omit this property or set it tofalse
. The default value isfalse
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key. - origin "AWS_KMS" | "EXTERNAL"
- The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is
AWS_KMS
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value toEXTERNAL
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignoreENABLED
when Origin isEXTERNAL
. When a KMS key with OriginEXTERNAL
is created, the key state isPENDING_IMPORT
andENABLED
isfalse
. After you import the key material,ENABLED
updated totrue
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating anOrigin
parameter of theAWS_CLOUDHSM
orEXTERNAL_KEY_STORE
values. - pending
Window NumberIn Days - Specifies the number of days in the waiting period before KMS deletes a KMS key that has been removed from a CloudFormation stack. Enter a value between 7 and 30 days. The default value is 30 days.
When you remove a KMS key from a CloudFormation stack, KMS schedules the KMS key for deletion and starts the mandatory waiting period. The
PendingWindowInDays
property determines the length of waiting period. During the waiting period, the key state of KMS key isPending Deletion
orPending Replica Deletion
, which prevents the KMS key from being used in cryptographic operations. When the waiting period expires, KMS permanently deletes the KMS key. KMS will not delete a multi-Region primary key that has replica keys. If you remove a multi-Region primary key from a CloudFormation stack, its key state changes toPendingReplicaDeletion
so it cannot be replicated or used in cryptographic operations. This state can persist indefinitely. When the last of its replica keys is deleted, the key state of the primary key changes toPendingDeletion
and the waiting period specified byPendingWindowInDays
begins. When this waiting period expires, KMS deletes the primary key. For details, see Deleting multi-Region keys in the Developer Guide. You cannot use a CloudFormation template to cancel deletion of the KMS key after you remove it from the stack, regardless of the waiting period. If you specify a KMS key in your template, even one with the same name, CloudFormation creates a new KMS key. To cancel deletion of a KMS key, use the KMS console or the CancelKeyDeletion operation. For information about thePending Deletion
andPending Replica Deletion
key states, see Key state: Effect on your KMS key in the Developer Guide. For more information about deleting KMS keys, see the ScheduleKeyDeletion operation in the API Reference and Deleting KMS keys in the Developer Guide. - rotation
Period NumberIn Days - Specifies a custom period of time between each rotation date. If no value is specified, the default value is 365 days.
The rotation period defines the number of days after you enable automatic key rotation that KMS will rotate your key material, and the number of days between each automatic rotation thereafter.
You can use the kms:RotationPeriodInDays condition key to further constrain the values that principals can specify in the
RotationPeriodInDays
parameter. For more information about rotating KMS keys and automatic rotation, see Rotating keys in the Developer Guide. - List<Property Map>
- Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.
Outputs
All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:
- Arn string
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Id string The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
- Arn string
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- Id string
- The provider-assigned unique ID for this managed resource.
- Key
Id string The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
- arn String
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- id String
- The provider-assigned unique ID for this managed resource.
- key
Id String The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
- arn string
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- id string
- The provider-assigned unique ID for this managed resource.
- key
Id string The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
- arn str
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- id str
- The provider-assigned unique ID for this managed resource.
- key_
id str The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
- arn String
The Amazon Resource Name (ARN) of the KMS key, such as
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ARN of a KMS key, see Key ARN in the AWS Key Management Service Developer Guide .
- id String
- The provider-assigned unique ID for this managed resource.
- key
Id String The key ID of the KMS key, such as
1234abcd-12ab-34cd-56ef-1234567890ab
.For information about the key ID of a KMS key, see Key ID in the AWS Key Management Service Developer Guide .
Supporting Types
KeyOrigin, KeyOriginArgs
- Aws
Kms - AWS_KMS
- External
- EXTERNAL
- Key
Origin Aws Kms - AWS_KMS
- Key
Origin External - EXTERNAL
- Aws
Kms - AWS_KMS
- External
- EXTERNAL
- Aws
Kms - AWS_KMS
- External
- EXTERNAL
- AWS_KMS
- AWS_KMS
- EXTERNAL
- EXTERNAL
- "AWS_KMS"
- AWS_KMS
- "EXTERNAL"
- EXTERNAL
KeySpec, KeySpecArgs
- Symmetric
Default - SYMMETRIC_DEFAULT
- Rsa2048
- RSA_2048
- Rsa3072
- RSA_3072
- Rsa4096
- RSA_4096
- Ecc
Nist P256 - ECC_NIST_P256
- Ecc
Nist P384 - ECC_NIST_P384
- Ecc
Nist P521 - ECC_NIST_P521
- Ecc
Secg P256k1 - ECC_SECG_P256K1
- Hmac224
- HMAC_224
- Hmac256
- HMAC_256
- Hmac384
- HMAC_384
- Hmac512
- HMAC_512
- Sm2
- SM2
- Key
Spec Symmetric Default - SYMMETRIC_DEFAULT
- Key
Spec Rsa2048 - RSA_2048
- Key
Spec Rsa3072 - RSA_3072
- Key
Spec Rsa4096 - RSA_4096
- Key
Spec Ecc Nist P256 - ECC_NIST_P256
- Key
Spec Ecc Nist P384 - ECC_NIST_P384
- Key
Spec Ecc Nist P521 - ECC_NIST_P521
- Key
Spec Ecc Secg P256k1 - ECC_SECG_P256K1
- Key
Spec Hmac224 - HMAC_224
- Key
Spec Hmac256 - HMAC_256
- Key
Spec Hmac384 - HMAC_384
- Key
Spec Hmac512 - HMAC_512
- Key
Spec Sm2 - SM2
- Symmetric
Default - SYMMETRIC_DEFAULT
- Rsa2048
- RSA_2048
- Rsa3072
- RSA_3072
- Rsa4096
- RSA_4096
- Ecc
Nist P256 - ECC_NIST_P256
- Ecc
Nist P384 - ECC_NIST_P384
- Ecc
Nist P521 - ECC_NIST_P521
- Ecc
Secg P256k1 - ECC_SECG_P256K1
- Hmac224
- HMAC_224
- Hmac256
- HMAC_256
- Hmac384
- HMAC_384
- Hmac512
- HMAC_512
- Sm2
- SM2
- Symmetric
Default - SYMMETRIC_DEFAULT
- Rsa2048
- RSA_2048
- Rsa3072
- RSA_3072
- Rsa4096
- RSA_4096
- Ecc
Nist P256 - ECC_NIST_P256
- Ecc
Nist P384 - ECC_NIST_P384
- Ecc
Nist P521 - ECC_NIST_P521
- Ecc
Secg P256k1 - ECC_SECG_P256K1
- Hmac224
- HMAC_224
- Hmac256
- HMAC_256
- Hmac384
- HMAC_384
- Hmac512
- HMAC_512
- Sm2
- SM2
- SYMMETRIC_DEFAULT
- SYMMETRIC_DEFAULT
- RSA2048
- RSA_2048
- RSA3072
- RSA_3072
- RSA4096
- RSA_4096
- ECC_NIST_P256
- ECC_NIST_P256
- ECC_NIST_P384
- ECC_NIST_P384
- ECC_NIST_P521
- ECC_NIST_P521
- ECC_SECG_P256K1
- ECC_SECG_P256K1
- HMAC224
- HMAC_224
- HMAC256
- HMAC_256
- HMAC384
- HMAC_384
- HMAC512
- HMAC_512
- SM2
- SM2
- "SYMMETRIC_DEFAULT"
- SYMMETRIC_DEFAULT
- "RSA_2048"
- RSA_2048
- "RSA_3072"
- RSA_3072
- "RSA_4096"
- RSA_4096
- "ECC_NIST_P256"
- ECC_NIST_P256
- "ECC_NIST_P384"
- ECC_NIST_P384
- "ECC_NIST_P521"
- ECC_NIST_P521
- "ECC_SECG_P256K1"
- ECC_SECG_P256K1
- "HMAC_224"
- HMAC_224
- "HMAC_256"
- HMAC_256
- "HMAC_384"
- HMAC_384
- "HMAC_512"
- HMAC_512
- "SM2"
- SM2
KeyUsage, KeyUsageArgs
- Encrypt
Decrypt - ENCRYPT_DECRYPT
- Sign
Verify - SIGN_VERIFY
- Generate
Verify Mac - GENERATE_VERIFY_MAC
- Key
Agreement - KEY_AGREEMENT
- Key
Usage Encrypt Decrypt - ENCRYPT_DECRYPT
- Key
Usage Sign Verify - SIGN_VERIFY
- Key
Usage Generate Verify Mac - GENERATE_VERIFY_MAC
- Key
Usage Key Agreement - KEY_AGREEMENT
- Encrypt
Decrypt - ENCRYPT_DECRYPT
- Sign
Verify - SIGN_VERIFY
- Generate
Verify Mac - GENERATE_VERIFY_MAC
- Key
Agreement - KEY_AGREEMENT
- Encrypt
Decrypt - ENCRYPT_DECRYPT
- Sign
Verify - SIGN_VERIFY
- Generate
Verify Mac - GENERATE_VERIFY_MAC
- Key
Agreement - KEY_AGREEMENT
- ENCRYPT_DECRYPT
- ENCRYPT_DECRYPT
- SIGN_VERIFY
- SIGN_VERIFY
- GENERATE_VERIFY_MAC
- GENERATE_VERIFY_MAC
- KEY_AGREEMENT
- KEY_AGREEMENT
- "ENCRYPT_DECRYPT"
- ENCRYPT_DECRYPT
- "SIGN_VERIFY"
- SIGN_VERIFY
- "GENERATE_VERIFY_MAC"
- GENERATE_VERIFY_MAC
- "KEY_AGREEMENT"
- KEY_AGREEMENT
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.