How it works...
Since KMS is a region-specific service, we need to create the KMS key within the same AWS region where we need to use the key for encryption or decryption. We can either use the AWS-managed default key for EBS, as we saw in this recipe, or use our own CMK.
To use our CMK to encrypt an EBS volume, we need to create a CMK from the KMS service dashboard. However, to use the AWS-managed default key for EBS, the additional steps are not required. The AWS-managed default key for EBS has an Alias Name of (default) aws/kms and a KMS Key ID of alias/aws/ebs.
It is important to note that we cannot use EC2 key pairs to encrypt our EBS volumes. EC2 key pairs are asymmetric keys and can be used for SSH. KMS keys are symmetric keys and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access