An Overview of AWS KMS
Start course
2h 45m

This course covers the core learning objective to meet the requirements of the 'Designing secure solutions in AWS - Level 2' skill

Learning Objectives:

  • Analyze the available options to secure credentials using features of AWS Identity and Access Management (IAM)
  • Evaluate the appropriate routing mechanism to securely access AWS service endpoints or internet-based resources from an Amazon VPC
  • Evaluate the appropriate encryption options available for data in transit and when at rest across AWS services
  • Evaluate the most appropriate key management service and options based on business requirements and governance controls



Hello and welcome to this lecture covering the fundamentals of the AWS KMS service.

The Key Management Service is a managed service used to store and generate encryption keys that are used by most AWS services that perform encryption to protect your data. For example, you can configure Amazon S3 to use KMS to perform data encryption against your objects using KMS generated keys, known as Server-Side Encryption using KMS (SSE-KMS). Or you can use KMS to help you encrypt your data being stored across your RDS databases.  Essentially, any service that offers encryption capabilities it is very likely that it interfaces with KMS to perform that encryption.

Due to the nature of this service, the KMS keys that are used to perform cryptographic operations must remain highly secure, as a result you should be aware that administrators and employees of AWS do not have access to your keys within KMS and they cannot recover your keys for you should you delete them. The responsibility of AWS is to simply administer the underlying operating systems and hardware security modules (HSMs) that KMS runs on.

As AWS has no access to your keys, it's our responsibility as the customer and users of the KMS service to administer our own encryption keys and restrict how those keys are deployed and used within our own environment against the data that we want to protect.

KMS itself is built from a number of core components which you should be familiar with if you are to implement a successful and effective encryption strategy within your organization.  The core of these components are the different keys that are available. Here is a quick overview of some of these.

  • AWS KMS Keys: These are used to to encrypt and decrypt data, in addition to generating keys that can be used outside of KMS
  • Customer Managed Keys: These are created by us as customers, and we have full control over these keys and their permissions
  • AWS Managed Keys: These keys are created by other AWS services and are managed by the corresponding integrated AWS service
  • AWS Owned Keys: These keys are owned and managed by AWS and are used across multiple accounts.  As a result, these keys are not tied to your AWS account itself 
  • Data Keys: These are keys that are used outside of KMS to encrypt data and other keys and are created by an AWS KMS Key
  • HMAC Keys: This is effectively a symmetric key which allows you to create and verify hash-based message authentication codes (HMAC) 

It is important to understand that the KMS service is only capable of implementing encryption at rest using these Keys, KMS does not perform encryption for data in transit or in motion. If you want to encrypt data while in transit, then you would need to use a different method such as SSL. However, if your data was encrypted at rest using KMS, then when it is being sent between 2 parties that data would be in ciphertext which could only be converted to plain text with the corresponding key. 

When maintaining compliance, governance and other regulations within your production environment, encryption is often required as an essential element of your security strategy.  As a result, KMS works seamlessly with AWS CloudTrail to audit and track how your encryption keys are being used and by whom, in addition to other metadata captured by the APIs used such as the source IP address, etc. The CloudTrail logs that are stored in S3 record KMS API calls such as Decrypt, Encrypt, GenerateDataKey, GetKeyPolicy and more! 

So in a nutshell, gathering a basic understanding of KMS in this lecture we have learnt that it is used to generate and provide a secure central repository of encryption keys to allow you to encrypt your data at rest when integrating with numerous AWS services.

About the Author
Learning Paths

Stuart has been working within the IT industry for two decades covering a huge range of topic areas and technologies, from data center and network infrastructure design, to cloud architecture and implementation.

To date, Stuart has created 150+ courses relating to Cloud reaching over 180,000 students, mostly within the AWS category and with a heavy focus on security and compliance.

Stuart is a member of the AWS Community Builders Program for his contributions towards AWS.

He is AWS certified and accredited in addition to being a published author covering topics across the AWS landscape.

In January 2016 Stuart was awarded ‘Expert of the Year Award 2015’ from Experts Exchange for his knowledge share within cloud services to the community.

Stuart enjoys writing about cloud technologies and you will find many of his articles within our blog pages.