AWS Security ChangesHomeSearch

AWS AmazonElastiCache: ElastiCache serverless migration: secret/KMS IAM policies and target user setup

Service: AmazonElastiCache · 2026-11-04 · Documentation medium

File: AmazonElastiCache/latest/dg/migration-to-serverless-auth.md · Type: iam

Summary

Adds a sample secret resource policy granting the elasticache.amazonaws.com service principal secretsmanager:GetSecretValue, a customer-managed KMS key policy statement granting kms:Decrypt, a warning not to add aws:SourceAccount/aws:SourceArn conditions, the ec2:DescribeSubnets permission needed by the caller, and a new 'Setting up your application's users on your target' section covering RBAC user/group setup, password rules, and NOAUTH/WRONGPASS authentication errors during migration.

Security assessment

The change documents IAM/secret/KMS permissions and authentication (RBAC user, password, default-user) configuration required for a serverless migration, including a warning that aws:SourceAccount/aws:SourceArn conditions would deny the secret read. This is security feature/permission guidance rather than a fix for a specific disclosed vulnerability or incident, so security_issue_related is false.

Evidence

+          "Action": "secretsmanager:GetSecretValue",

Diff

diff --git a/AmazonElastiCache/latest/dg/migration-to-serverless-auth.md b/AmazonElastiCache/latest/dg/migration-to-serverless-auth.md
index 84e4092..39d2ed3 100644
--- a//AmazonElastiCache/latest/dg/migration-to-serverless-auth.md
+++ b//AmazonElastiCache/latest/dg/migration-to-serverless-auth.md
@@ -7 +7 @@
-Storing source credentialsPermissions for the migration userProviding the secret when you prepare a migrationEncryption in transitRelated topics
+Storing source credentialsPermissions for the migration userSetting up your application's users on your targetProviding the secret when you prepare a migrationEncryption in transitRelated topics
@@ -12,0 +13,2 @@ If your source cache requires authentication, ElastiCache needs credentials to c
+Your target cache must also accept the credentials that your application uses on your source. For more information about setting up target users, see Setting up your application's users on your target.
+
@@ -71,0 +74,15 @@ ElastiCache reads the secret with its own service credentials, so the secret nee
+The following resource policy grants ElastiCache read access to the secret.
+    
+    
+    {
+      "Version": "2012-10-17",
+      "Statement": [
+        {
+          "Effect": "Allow",
+          "Principal": { "Service": "elasticache.amazonaws.com" },
+          "Action": "secretsmanager:GetSecretValue",
+          "Resource": "*"
+        }
+      ]
+    }
+
@@ -73,0 +91,10 @@ If the secret is encrypted with a customer managed AWS KMS key, grant that servi
+Add the following statement to the key policy of the customer managed key that encrypts the secret.
+    
+    
+    {
+      "Effect": "Allow",
+      "Principal": { "Service": "elasticache.amazonaws.com" },
+      "Action": "kms:Decrypt",
+      "Resource": "*"
+    }
+
@@ -78 +105,3 @@ If the resource policy or the key policy leaves out the service principal, Elast
-The IAM identity that calls `PrepareMigration` also needs `secretsmanager:GetSecretValue` on the secret, and `kms:Decrypt` on the key that encrypts it. ElastiCache first reads the secret with your credentials to confirm that you have access, and then with its own service credentials. If either read is denied, the prepare step fails with the same access denied message, so check both your own permissions and the secret's resource and key policies.
+Do not add an `aws:SourceAccount` or `aws:SourceArn` condition to these statements. A condition on either key denies the read, and the prepare step fails with an access denied message.
+
+The IAM identity that calls `PrepareMigration` also needs `secretsmanager:GetSecretValue` on the secret, and `kms:Decrypt` on the key that encrypts it. When it calls `PrepareMigration` and `StartMigration`, it also needs `ec2:DescribeSubnets`, because ElastiCache checks the subnets of your target cache with your credentials. ElastiCache first reads the secret with your credentials to confirm that you have access, and then with its own service credentials. If either read is denied, the prepare step fails with the same access denied message, so check both your own permissions and the secret's resource and key policies.
@@ -96 +125 @@ If your source authenticates users by name and controls what each one can do, cr
-This block applies as written to every source version that supports ACLs: Redis OSS 6.0 and later, and all supported Valkey versions.
+This block applies as written to every source version that supports access control lists (ACLs): Redis OSS 6.0 and later, and all supported Valkey versions.
@@ -115,2 +143,0 @@ Where:
-Your application's own users must exist on both your source and your target. During a migration, client authentication commands are forwarded to your source. After cutover, your target answers them. If your source and your target do not have a consistent ACL configuration, your application can encounter authentication errors during the migration.
-
@@ -118,0 +146,12 @@ ElastiCache verifies these grants when you prepare the migration and again when
+## Setting up your application's users on your target
+
+Before you prepare the migration, set up authentication on your target cache to match your source. Create an ElastiCache user for each user that your application uses on your source, with the same user name, password, and permissions. Add those users to a user group, and then assign the group to your target cache. For more information, see [Role-Based Access Control (RBAC)](./Clusters.RBAC.html) and [Assigning User Groups to Serverless Caches Using the AWS CLI](./Clusters.RBAC.html#Users-groups-to-SCs-CLI).
+
+If your source uses a single password with no user names, your application authenticates as the default user. The default user in your target's user group must have that same password.
+
+ElastiCache user passwords must be 16 to 128 printable characters and cannot contain a comma, a double quotation mark, a slash, or an at sign. Your target checks your application's credentials during the migration and after cutover, so your application's password must meet these rules. If it does not, change the password on your source and in your application before you prepare the migration.
+
+Your application's own users must exist on both your source and your target. During a migration, the migration endpoint checks your application's credentials on your target first and then on your source. If your source and your target do not have a consistent ACL configuration, your application can encounter authentication errors during the migration. For example, a user that is missing on your target, or that has a different password there, fails with `WRONGPASS` as soon as your application authenticates through the migration endpoint.
+
+If your source accepts connections without authentication, keep the default user on your target enabled with no password. A client that does not authenticate gets a `NOAUTH` error from the migration endpoint when the default user on your target is disabled or has a password.
+