CLOUD CONCEPT

Key Management

Key management is the controlled creation, protection, use, rotation, and retirement of cryptographic keys throughout their lifecycle.

Cloud Concepts Hub →

What is Key Management

Encryption depends on keeping cryptographic keys protected while making them available to authorized systems. Key management defines who controls those keys, how applications use them, and how access is audited and recovered, supporting both encryption at rest and encryption in transit.

Key management is the operational discipline behind secure encryption. A strong encryption algorithm provides little protection if its keys are exposed alongside the encrypted data or available to unauthorized users. Effective key management covers secure generation, storage, distribution, authorized use, rotation, recovery, and eventual destruction. It also assigns responsibility for each stage so that neither the cloud provider nor the customer assumes the other has handled a required control.

Encryption at rest protects stored information, such as objects, database files, disks, and backups. Cloud services can often encrypt this data automatically, but engineers must still understand which keys are used and who can authorize decryption. Provider-controlled keys reduce administrative work. Customer-managed keys offer more direct control over permissions, lifecycle settings, and auditability, but introduce configuration and availability responsibilities. Customer-managed does not necessarily mean the customer holds or can export the underlying key material.

Encryption in transit protects information moving between endpoints, commonly through TLS for HTTPS connections. TLS uses certificates and asymmetric cryptography to authenticate endpoints and establish shared session keys that encrypt traffic. Protecting certificate private keys and renewing certificates are therefore important management tasks. Encrypting a storage volume does not encrypt network traffic, and enabling HTTPS does not automatically encrypt the destination database or its backups.

Cloud systems frequently use envelope encryption. A data key encrypts the actual data, and a separate key-encryption key protects that data key. The encrypted data key can be stored with the ciphertext because access to the protecting key is still required to recover it. This approach allows efficient local encryption of large datasets while centralizing protection and authorization for higher-level keys. Plaintext data keys should exist only where needed and should not be written into logs, source repositories, or application configuration.

For example, an application might upload reports to object storage using server-side encryption with a customer-managed key. Its workload identity needs the relevant storage permissions and the required key permissions. A user who can retrieve an encrypted object might still be unable to decrypt it, depending on the encryption configuration and authorization path. Conversely, encryption does not stop a compromised application identity that already has permission to read and decrypt the reports.

Key rotation introduces new key material to limit continued reliance on an older key. It does not inherently re-encrypt existing data or undo a previous disclosure. Older key material may need to remain available to decrypt retained records and backups. Disabling a key can interrupt applications immediately, while permanently deleting necessary key material can make data unrecoverable. Recovery plans must therefore account for both encrypted data and access to its keys.

The practical trade-off is control versus operational burden. Dedicated hardware security modules can satisfy specialized custody or cryptographic requirements, but require more design and administration than an integrated managed key service. Apply least privilege, separate key administration from data access where practical, audit key operations, and test recovery. For exam scenarios, first identify whether the requirement concerns stored data, network traffic, or control over cryptographic keys; these are related but distinct concerns.

Key aspects of Key Management

Effective key management combines protected key material, controlled access, lifecycle governance, and recovery planning for encrypted data and communications.

Lifecycle control

Manage keys from secure generation through activation, rotation, retirement, and destruction. Retention decisions must preserve decryption access for data and backups that are still required.

Protected key storage

Keep key material out of source code, logs, and unprotected configuration files. Managed key services and hardware security modules can protect keys and perform cryptographic operations without exposing the protecting key to applications.

Least-privilege key access

Authorize only the identities and operations required for each workload. Separate permission to administer a key from permission to decrypt application data where practical.

Protection at rest and in transit

Use storage encryption for persisted data and protocols such as TLS for network connections. Each requires appropriate key controls; enabling one does not automatically enable the other.

Envelope encryption

Encrypt data with a data key and protect that data key with a separate key-encryption key. This supports efficient bulk encryption while centralizing control over the protecting key.

Auditability and availability

Record key administration and cryptographic operations where supported, and investigate unexpected usage. Test the effects of denied permissions, disabled keys, and recovery procedures before they cause production outages.

Cloud services for Key Management

AWS KMS centralizes key authorization for integrated services such as Amazon S3, while S3 applies encryption to stored objects. AWS Certificate Manager addresses a different layer by managing TLS certificates used by supported endpoints to protect traffic in transit. AWS CloudHSM supports workloads that require dedicated HSMs and more direct cryptographic control rather than serving as a mandatory component of every encryption design. AWS CloudTrail supplies audit records for KMS activity. Together, these services illustrate the separation between encrypting data, controlling keys, securing connections, and monitoring access; each layer still requires appropriate configuration and permissions.

AWS CloudHSM image AWS CloudHSM

AWS CloudHSM provides dedicated hardware security modules for workloads that need direct control over cryptographic keys and operations. Customers manage HSM users, keys, and application integration, accepting more operational responsibility than with a typical integrated key service.

Open AWS CloudHSM →
Amazon Simple Storage Service image Amazon S3

Amazon S3 supports server-side encryption at rest, including options using S3-managed keys or AWS KMS keys. With SSE-KMS, access can depend on both S3 authorization and the required KMS permissions; HTTPS separately protects transfers.

Open Amazon S3 →
AWS CloudTrail image AWS CloudTrail

CloudTrail records AWS KMS API activity, supporting investigation of key administration and cryptographic use. Engineers can use these records to review unexpected decrypt requests, policy changes, or key deletion scheduling.

Open AWS CloudTrail →