How to Use AUTH with AWS ElastiCache Redis in Drupal

Secure Redis connections in Drupal using password authentication

When using AWS ElastiCache for Redis as a caching backend for your Drupal site, it’s important to protect access to the Redis service—not just with network-level security, but also at the application level using AUTH. This guide focuses on using a single AUTH token with Drupal’s Redis module and the PHPRedis extension, which is the most compatible approach.


Using Redis AUTH Token (Single Password)

AWS ElastiCache Redis supports AUTH token authentication, allowing clients to authenticate with a single password. This is the recommended method for use with PHPRedis, which does not support named user authentication.

✅ How to Enable AUTH Token in AWS

  1. In the AWS ElastiCache Console, go to your Redis cluster.
  2. Choose Modify.
  3. Under Access Control, select Redis AUTH.
  4. Enter a secure password (minimum 16 characters).
  5. Save changes and wait for the cluster to update.

You can enable or modify this setting at any time, even after the cluster is live.

Drupal Configuration

In your settings.php:

This configuration instructs Drupal to connect over TLS and authenticate with the Redis AUTH token.

⚠️ If you see the error WRONGPASS invalid username-password pair or user is disabled, it likely means the cluster is configured for ACL-based authentication instead of token-based authentication. Ensure that Redis AUTH is enabled and user groups are not assigned.


Troubleshooting

Error Message Cause
WRONGPASS invalid username-password pair or user is disabled Cluster is using user group (ACL mode) instead of AUTH token mode
NOAUTH Authentication required Password is missing in settings.php
Connection refused TLS misconfiguration, wrong endpoint, or incorrect port

Summary

Feature Supported
Redis AUTH token ✅ Yes
ACLs with named users ❌ No (not supported by PHPRedis)

With just a few adjustments to your Drupal config, you can connect securely to AWS ElastiCache Redis using TLS and an AUTH token. This is the simplest and most compatible method when using PHPRedis.

Need help configuring this on your hosting environment? Reach out to Reliable Penguin—we’re happy to assist.

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.