An Overview of AWS KMS
Start course
4h 50m

This section of the AWS Certified Solutions Architect - Professional learning path introduces the key identity management, security, and encryption services within AWS relevant to the AWS Certified Solutions Architect - Professional exam. Core to security is AWS Identity & Access Management commonly referred to as IAM. This service manages identities and their permissions that can access your AWS resources, so understanding how this service works and what you can do with it will help you to maintain a secure AWS environment. IAM is an important service in ensuring your resources are secure.

Want more? Try a Lab Playground or do a Lab Challenge

Learning Objectives

  • Learn about identity and access management on AWS, including users, groups & roles, IAM policies, MFA, identity federation, and cross-account access
  • Learn the fundamentals of AWS Web Application Firewall (WAF), including what it is, when to use it, how it works, and why use it
  • Understand how to configure and monitor AWS WAF
  • Learn about AWS Firewall Manager and its components
  • Learn how to configure AWS Shield
  • Learn the fundamentals of AWS Cognito

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

Danny has over 20 years of IT experience as a software developer, cloud engineer, and technical trainer. After attending a conference on cloud computing in 2009, he knew he wanted to build his career around what was still a very new, emerging technology at the time — and share this transformational knowledge with others. He has spoken to IT professional audiences at local, regional, and national user groups and conferences. He has delivered in-person classroom and virtual training, interactive webinars, and authored video training courses covering many different technologies, including Amazon Web Services. He currently has six active AWS certifications, including certifications at the Professional and Specialty level.