create-key
command: aws kms create-key
.schedule-key-deletion
command: aws kms schedule-key-deletion --key-id <old-key-id> --pending-window-in-days <number-of-days>
.enable-key-rotation
command: aws kms enable-key-rotation --key-id <key-id>
.create-key
command to generate a new key if necessary: aws kms create-key
.create-key-grant
command: aws kms create-key-grant --key-id <key-id> --grantee-principal <grantee-principal> --operations <operations>
.boto3
library to create a new CloudTrail trail for KMS.kms.amazonaws.com
as the resource type.boto3
library to create a new AWS Config rule for KMS.boto3
library to enable AWS Security Hub for KMS.