Create a customer managed KMS key, encrypt and decrypt data, and generate a data key using the AWS CLI.
https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
- ID: kms/getting-started
- Phase: create
- Complexity: beginner
- Core actions: kms:CreateKey, kms:Encrypt, kms:Decrypt
- Creates a customer managed KMS key
- Creates an alias for the key
- Describes the key metadata
- Encrypts data using fileb://
- Decrypts the ciphertext
- Generates a data key for client-side encryption
- Lists KMS keys and aliases
bash aws-kms-gs.sh- KMS customer managed key (with alias)
The key costs $1/month until deleted. The script prompts you to clean up when it finishes. Cleanup schedules the key for deletion with a 7-day waiting period.
- Run: ~7 seconds
$1/month for the customer managed key. Delete the key promptly to avoid charges.