AWS Key Management Service (AWS KMS)
Cloud service · AWS · Updated

AWS Key Management Service (AWS KMS)

In short

AWS Key Management Service (AWS KMS) is a managed service that makes it easy for you to create and control the cryptographic keys used to secure your data across AWS services and in your applications.

Cloud Services Hub →

9 key features of AWS Key Management Service (AWS KMS)

AWS Key Management Service (AWS KMS) is a secure and centralized service designed to manage cryptographic keys, offering seamless integration with AWS services, fine-grained access control, auditing capabilities, automatic key rotations, and high availability.

01
Centralized Key Management

AWS KMS allows you to centralize control over the cryptographic keys used to protect your data. The service provides a single place to manage keys, which simplifies the management process and enhances security.

02
Integrated with AWS Services

It is seamlessly integrated with other AWS services, making it easier to encrypt data stored in these services. For example, you can use KMS keys to encrypt data in S3 buckets, EBS volumes, and RDS databases.

03
Customer Managed KMS Keys

AWS KMS enables you to create and manage your own customer managed KMS keys. These keys can control access to data encryption keys that encrypt and decrypt your data.

04
Access Control

KMS provides detailed access control policies, allowing you to specify who can use your keys and under what conditions. This includes the ability to implement IAM policies and grants.

05
Auditing and Compliance

The service integrates with AWS CloudTrail to provide logs of all key usage. This helps in auditing, tracking key usage, and demonstrating compliance with regulatory requirements.

06
Automatic Rotations

AWS KMS supports the automatic rotation of eligible symmetric encryption KMS keys with AWS KMS-generated key material at configurable intervals from 90 to 2560 days, which can enhance security by changing the key material regularly without changing the application code that uses them.

07
High Availability and Durability

Deployed within AWS’s managed, secure, and resilient infrastructure, KMS is designed to be both highly available and durable, ensuring that your cryptographic keys are always accessible and protected.

08
Non-exportable KMS Keys

AWS KMS provides no mechanism to export plaintext KMS keys.

09
Key Aliases

An alias is a user-friendly name associated with a KMS key and can be used instead of the key ID in many AWS KMS API operations.

Where AWS Key Management Service (AWS KMS) is used

AWS Key Management Service (AWS KMS) is used for encrypting data across AWS services, managing cloud application keys, digital signing, ensuring regulatory compliance through controlled key management, and providing secure key storage with automatic rotation.

  1. 01
    Encrypting Data

    AWS KMS enables users to easily encrypt data stored in various AWS services such as S3, EBS, RDS, and Redshift, ensuring that sensitive information is protected at rest. Through the integration of KMS with these services, encryption and decryption processes are streamlined, providing a secure and efficient method for protecting data.

  2. 02
    Managing Keys for Cloud Applications

    Developers can utilize AWS KMS to manage cryptographic keys for their cloud-based applications. This includes creating, rotating, and controlling usage policies for encryption keys, enabling secure access to application data. KMS simplifies the key management process, reducing the risk associated with handling keys directly and ensuring compliance with security policies.

  3. 03
    Digital Signing

    AWS KMS also supports digital signing, allowing users to ensure the integrity and authenticity of their documents and code. By signing data using a private key managed in KMS, users can verify the sender’s identity and that the data has not been tampered with, enhancing trust and security for digital transactions and distributions.

  4. 04
    Regulatory Compliance

    Organizations subject to regulatory requirements related to data protection can leverage AWS KMS to help meet compliance obligations. KMS provides mechanisms for key management and encryption that align with standards such as GDPR, HIPAA, and PCI-DSS, offering detailed key usage logs and the ability to control and monitor access to keys.

  5. 05
    Secure Key Storage and Rotation

    AWS KMS is designed to securely store encryption keys in a centralized service, reducing the risk of unauthorized access. It supports automatic key rotation, which enhances security by regularly changing the encryption keys. This helps in maintaining confidentiality and integrity of the data over time without manual intervention.

How AWS Key Management Service (AWS KMS) is priced

AWS KMS pricing includes monthly fees for customer managed CMKs, charges based on the volume of cryptographic request operations, additional fees for specialized operations like data key pair generation, and potential costs for using KMS with integrated AWS services.

Key Storage

Each customer managed KMS key costs $1 per month, prorated hourly, including each primary and replica multi-Region key and keys using imported material, CloudHSM, or an external key store. AWS managed and AWS owned KMS keys have no creation or storage charge.

Requests Pricing

AWS KMS charges for the requests made to the service, which includes cryptographic operations such as encrypt, decrypt, and generateDataKey, among others. The price depends on the volume of requests, with the first tier of requests typically included for free and additional requests charged at a per-request rate.

Data Key Pair Generation and Asymmetric Operations

Requests to GenerateDataKeyPair and GenerateDataKeyPairWithoutPlaintext, and requests such as Sign, Verify, Encrypt, Decrypt, and GetPublicKey that reference asymmetric KMS keys, are excluded from the free tier.

Key Rotation

For automatic or on-demand rotation, the first and second rotations each add $1 per month, prorated hourly, to the key's storage cost. Subsequent rotations do not add further charges.

CloudHSM-backed Key Store Costs

Using a CloudHSM-backed key store incurs standard AWS CloudHSM charges in addition to AWS KMS charges.

Services AWS Key Management Service (AWS KMS) works with

Amazon AppFlowAmazon AppFlow

AWS KMS encrypts data that AppFlow stores while processing flows. You can select a customer managed key to control access to that data.

Amazon AthenaAmazon Athena

AWS KMS protects encrypted data that Athena reads and the query results it writes to Amazon S3. Athena workgroups can also use KMS keys to encrypt stored query information.

Amazon Augmented AI (Amazon A2I)Amazon Augmented AI (Amazon A2I)

AWS KMS can encrypt human review output written by Amazon A2I to Amazon S3. The flow definition specifies the key, and the execution role needs permission to use it.

Amazon AuroraAmazon Aurora

AWS KMS protects Aurora database storage, automated backups, snapshots, and replicas for encrypted clusters. Customer managed keys let you control access to the encrypted database.

Amazon Aurora ServerlessAmazon Aurora Serverless

AWS KMS protects the storage, backups, and snapshots of encrypted Aurora Serverless databases. The database's KMS key remains in use as compute capacity scales.

Amazon Bedrock

AWS KMS can protect Bedrock resources such as model customization data, custom models, and stored agent or knowledge base information. Supported configurations let you select customer managed keys.

Amazon Bedrock AgentCore

AWS KMS can encrypt data stored by AgentCore Memory using a customer managed key. Key policies control whether AgentCore can encrypt and decrypt that memory data.

Amazon BraketAmazon Braket

AWS KMS can protect Braket Hybrid Jobs storage and job output stored in Amazon S3. You can configure customer managed keys for supported job encryption settings.

Amazon CloudFrontAmazon CloudFront

AWS KMS can protect S3 objects served through CloudFront using origin access control. The KMS key policy grants the CloudFront distribution permission to decrypt the encrypted origin objects.

AWS Key Management Service (AWS KMS) exam questions

Real practice exam questions on AWS Key Management Service (AWS KMS), with the correct answer and its explanation. Answer them with every option in the exam simulator.

AIB-C01 (beta)

A media company must retain proprietary model artifacts from its AI content-generation system for five years. An external archive provider will store the artifacts but will not run inference or otherwise process them. Governance policy requires that the provider cannot read the artifacts, even with its storage administrator privileges, while authorized company staff must be able to recover them. Which approach should the governance lead approve?

Show answerCORRECT ANSWER

Encrypt the artifacts within the company's environment before transfer, using an established client-side encryption solution backed by a company-controlled AWS KMS key. Withhold decryption permissions from the provider and retain the required key for authorized recovery.

Encrypting before transfer ensures the archive provider receives only ciphertext. Keeping decryption authority within the company prevents the provider's storage privileges from revealing the contents. Retaining the required key allows authorized staff to recover the artifacts throughout the retention period.

MLA-C02 (beta)

A company stores Amazon SageMaker AI model artifacts in Amazon S3 using server-side encryption with a customer managed AWS KMS key. During a key replacement, an administrator updates the alias alias/ml-artifacts to reference a new KMS key and schedules the original key for deletion. New artifact uploads succeed, but deploying a model from an artifact uploaded before the replacement fails. The underlying KMS error is KMSInvalidStateException.

The engineer confirms that the deployment execution role has s3:GetObject permission and that the IAM and key policies authorize decryption with both keys. The original key's deletion waiting period has not expired. The company must restore deployment without rewriting the existing artifacts.

Which action should the engineer take?

Show answerCORRECT ANSWER

Cancel deletion of the original key, and then enable that key.

Existing S3 objects remain encrypted under the original key after an alias is redirected. A key pending deletion cannot decrypt data. Canceling deletion places the key in the Disabled state, so the engineer must also enable it to restore access to the existing artifacts.

SAP-C03

A healthcare company is replacing ECDSA signatures on short-lived treatment authorization decisions. A central service signs each decision by using AWS KMS, and downstream services verify the signature before acting. The new signatures must provide at least NIST security category 3 protection against quantum attacks. Signing private keys must remain in AWS KMS.

The downstream services already support the required post-quantum verification algorithms. However, an integration gateway imposes two fixed transport options: a Base64-encoded signature in a response header with a maximum value length of 4,096 ASCII bytes, or an unencoded signature in a binary response-body field with a maximum length of 4,096 bytes. These limits apply to the signature alone. Compression, fragmentation, and external signature retrieval are not permitted.

Which implementation meets all the requirements?

Show answerCORRECT ANSWER

Create an AWS KMS ML-DSA-65 signing key and return each signature as unencoded bytes in the binary response-body field.

ML-DSA-65 provides NIST security category 3 protection and produces 3,309-byte signatures. An unencoded signature fits within the 4,096-byte binary field. AWS KMS performs signing without exporting the private key.

Practice AWS Key Management Service (AWS KMS) in a full exam

Questions on AWS Key Management Service (AWS KMS) in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is AWS Key Management Service (AWS KMS)

3 min read

AWS Key Management Service (AWS KMS) is a managed service provided by Amazon Web Services that enables clients to create and control cryptographic keys that secure data. These keys can be used to encrypt data stored in various AWS services and ensure that access to this data is tightly controlled and logged, enhancing the overall security posture of an organization's cloud infrastructure. 

AWS KMS is designed to be both secure and highly available, utilizing multiple physical locations for redundancy, and is seamlessly integrated with other AWS services, making it a versatile component in the AWS ecosystem for managing data encryption. AWS KMS offers a range of features aimed at simplifying the process of key management while providing robust security controls. 

AWS KMS applies resource quotas and request quotas independently for each account and Region. Quotas are adjustable except for the on-demand rotation resource quota and the AWS CloudHSM key store request quota.

AWS KMS supports three types of KMS keys: customer managed keys, AWS managed keys, and AWS owned keys.

Customer-managed KMS keys give users full authority over the key lifecycle, policies, and usage, whereas AWS-managed KMS keys are created, managed, and used on the customer's behalf by AWS services. 

By default, KMS keys are stored and usable only in their creation Region. Multi-Region KMS keys can be used interchangeably across Regions, but creating them moves key material across Region boundaries within AWS KMS, which can affect data residency and sovereignty requirements.

The customer managed key quota is 100,000 keys per account per Region, counting keys regardless of key specification or state. AWS managed and AWS owned keys do not count against this quota.

AWS KMS also supports digital signing with asymmetric key pairs.

Security in AWS KMS is multi-faceted, incorporating hardware security modules (HSMs) underpinning the service to securely generate, store, and manage cryptographic keys. The service complies with various compliance programs to ensure that data protection meets the rigorous standards required for sensitive and regulated data.

AWS KMS keys created in AWS KMS are protected by FIPS 140-3 Security Level 3 validated hardware security modules.

All requests to AWS KMS must use TLS, and AWS KMS hosts accept only TLS cipher suites that provide perfect forward secrecy.

For symmetric keys, AWS KMS also supports custom key stores under your control, backed by AWS CloudHSM or your own external key manager outside AWS.

AWS CloudTrail logs requests against customer managed and AWS managed KMS keys. Customers do not have visibility into AWS owned key usage in CloudTrail.

Moreover, AWS KMS facilitates the encryption process by integrating with other AWS services. This integration allows data encrypted in one service, such as Amazon S3 for storage, to be seamlessly decrypted by another service authorized to use the same key, such as Amazon EC2 for computing, without complex key management and exchange protocols. This not only simplifies operational models but also enhances security by ensuring that encrypted data can remain protected throughout its lifecycle within the AWS ecosystem. 

AWS KMS also includes features for controlling access to cryptographic keys. Fine-grained policies can be applied to customer managed KMS keys, allowing organizations to specify who can use these keys and under what conditions. This is complemented by the capability to temporally disable keys or schedule their deletion, providing further mechanisms to enforce data protection policies and regulatory compliance. 

In summary, AWS Key Management Service offers a comprehensive, integrated solution for managing cryptographic keys within the AWS cloud environment. Its focus on security, compliance, and integration makes it a critical tool for organizations of all sizes as they navigate the complexities of data encryption and protection in the cloud. By simplifying key management and enforcing strict security controls, AWS KMS plays a pivotal role in modern cloud security strategies, enabling businesses to protect sensitive information and meet their compliance obligations with confidence.

Learn AWS Key Management Service (AWS KMS) in lessons

20 short lessons on AWS Key Management Service (AWS KMS) in 10 certification courses.

and 14 more lessons

Open the lessons

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.