AWS AmazonElastiCache: Secret/KMS permissions for serverless migration narrowed to one principal
Summary
The auth prerequisites were rewritten: only the `elasticache.amazonaws.com` service principal now needs `secretsmanager:GetSecretValue` (the `elasticache.aws.internal` principal was removed), and the KMS key-policy guidance was consolidated to grant that same principal use of a customer managed key, reiterating that the default AWS managed key cannot be used.
Security assessment
The change documents least-privilege IAM/KMS requirements for ElastiCache to read Secrets Manager credentials, removing an extra internal principal from the required grants and clarifying that a customer managed KMS key (not the AWS managed key) must be used. This is security hardening guidance rather than a fix for a specific disclosed vulnerability.
Evidence
+ElastiCache reads the secret with its own service credentials, so the secret needs a resource policy. Grant `secretsmanager:GetSecretValue` to the `elasticache.amazonaws.com` service principal.
Diff
diff --git a/AmazonElastiCache/latest/dg/migration-to-serverless-auth.md b/AmazonElastiCache/latest/dg/migration-to-serverless-auth.md index 2f8a4f9..84e4092 100644 --- a//AmazonElastiCache/latest/dg/migration-to-serverless-auth.md +++ b//AmazonElastiCache/latest/dg/migration-to-serverless-auth.md @@ -70 +70 @@ The prepare step validates the secret's format, whether you created the secret o -ElastiCache reads the secret with its own service credentials, so the secret needs a resource policy. Grant `secretsmanager:GetSecretValue` to both of these service principals: +ElastiCache reads the secret with its own service credentials, so the secret needs a resource policy. Grant `secretsmanager:GetSecretValue` to the `elasticache.amazonaws.com` service principal. @@ -72 +72 @@ ElastiCache reads the secret with its own service credentials, so the secret nee - * `elasticache.amazonaws.com` +If the secret is encrypted with a customer managed AWS KMS key, grant that service principal permission to use the key in the key policy. @@ -74 +74 @@ ElastiCache reads the secret with its own service credentials, so the secret nee - * `elasticache.aws.internal` +**Your secret cannot use the default AWS managed key for Secrets Manager.** That key cannot be granted to the ElastiCache service principal, so encrypt the secret with a customer managed key. @@ -76,8 +76 @@ ElastiCache reads the secret with its own service credentials, so the secret nee - - - -If the secret is encrypted with a customer managed AWS KMS key, grant the same two principals permission to use that key in the key policy. - -**Your secret cannot use the default AWS managed key for Secrets Manager.** That key cannot be granted to the ElastiCache service principals, so encrypt the secret with a customer managed key. - -Without both principals on both policies, ElastiCache cannot retrieve the credentials, and the prepare step fails with an access denied message. +If the resource policy or the key policy leaves out the service principal, ElastiCache cannot retrieve the credentials, and the prepare step fails with an access denied message.