Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.6 Update released for Drupal core (11.4.6)! Release: Drupal 10.6.16 Update released for Drupal core (10.6.16)! Release: Cms 2.1.4 Update released for Drupal core (2.1.4)! Release: Drupal 12.0.0-alpha1 First alpha version released for Drupal core (12.0.0-alpha1). Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.9 Minor update available for module photoswipe (5.0.9). Release: Template Whisperer 4.1.2 Minor update available for module template_whisperer (4.1.2). Release: SDC Components 2.0.0 Major update available for module sdc_components (2.0.0). Release: OpenCulturas 3.0.7 Minor update available for distribution openculturas (3.0.7). Module Revived: Image field to media 3.0.2 Module image_field_to_media updated after 13 months of inactivity (3.0.2). Security Coverage: Analyze PostHog Module analyze_posthog now has official Drupal security advisory coverage.

Encrypt KMS

77 sites Security covered Drupal 8–11

Part of the Encrypt ecosystem · 4 projects

View on drupal.org

This module integrates with AWS KMS (Key Management Service) to encrypt data for your Drupal site. It allows you to use your AWS KMS encryption key to protect sensitive information directly from within Drupal.

This module adds a new encryption method for the Encrypt framework - it allows you to encrypt data using AWS KMS.

Get Started

This guide assumes you have an AWS account and working knowledge of KMS, and the following resources provisioned in AWS.

  1. A KMS key
  2. An IAM user with privileges to encrypt and decrypt using aforementioned key

Ensure this module and its dependencies are available in your codebase.

Enable the Encrypt KMS module.

Ensure your user account has the administer encrypt permission.

Add a new Key - select the KMS Key type and enter the ARN of the KMS key. This is just an identifier, and is completely fine to store in the "Configuration" storage provider.

Add a new Encryption Profile - choose the Amazon KMS encryption method and the key you just created.

Go to the Encrypt KMS configuration form and add your AWS IAM user credentials.

Note: At this point you can use this profile to encrypt data in your system. However, this service isn't designed to handle PII/PHI data.
If you're encrypting PII/PHI you should also complete the additional setup below.

Install Real AES.

Add a new Key - select the KMS Data Key type and choose the encryption profile you created earlier. Select 'AWS KMS' for the key provider and choose the same encryption profile.

Add a new Encryption Profile - choose the Authenticated AES encryption method and the KMS Data Key you created in the previous step.

This setup generates an AES key and encrypts it via the KMS Provider.
When you use this second encryption profile, the only data sent to AWS is the encrypted key to be decrypted.
That key is then used to handle all the encryption operations on the site, so no PII is ever sent to AWS.

Tip: Because Encrypt KMS can be used as a key provider, any secret can be stored in KMS, not just keys.

Great, you are now set up and can start encrypting fields, webform submissions and lots more.

Tip: Use the Key module's configuration override capability to securely store the AWS credentials.

AWS Credentials

There are alternatives to configuring the AWS credentials in the admin form.

settings.php

$config['encrypt_kms.settings']['aws_key'] = 'foo';
$config['encrypt_kms.settings']['aws_secret'] = 'bar';

If you do not explicitly set AWS key and secret in config, it will fall back to:

  1. IAM Instance Profile
  2. Exported credentials in environment variables
  3. The default profile in a ~/.aws/credentials file

See the AWS SDK Guide on Credentials.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
2.0.2 Stable 8–11 Jun 4, 2026