aws kms enable-key-rotation
Enables automatic rotation of the key material of the specified symmetric encryption KMS key. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To enable automatic rotation of a KMS key
The following enable-key-rotation example enables automatic rotation of a customer managed KMS key with a rotation period of 180 days. The KMS key will be rotated one year (approximate 365 days) from the date that this command completes and every year thereafter.
The --key-id parameter identifies the KMS key. This example uses a key ARN value, but you can use either the key ID or the ARN of the KMS key.
* The --rotation-period-in-days parameter specifies the number of days between each rotation date. Specify a value between 90 and 2560 days. If no value is specified, the default value is 365 days.
aws kms enable-key-rotation --key-id arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 --rotation-period-in-days 180Identify--key-idIdentifies a symmetric encryption KMS key.--rotation-period-in-daysUse this parameter to specify a custom period of time between each rotation date.This command produces no output. To verify that the KMS key is enabled, use the get-key-rotation-status command.
For more information, see Rotating keys in the AWS Key Management Service Developer Guide.
Options
--key-idIdentifies a symmetric encryption KMS key.--rotation-period-in-daysUse this parameter to specify a custom period of time between each rotation date.