ElastiCache AUTH Token Missing
elasticache-auth-token-missing
What this rule checks
Detects Redis replication groups with transit encryption but no AUTH token configured.
How to fix it
- 1Set AuthToken to require Redis client authentication
import { Stack, App } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as elasticache from 'aws-cdk-lib/aws-elasticache';
new elasticache.CfnReplicationGroup(this, 'Redis', {
replicationGroupDescription: 'session cache',
engine: 'redis',
cacheNodeType: 'cache.t3.micro',
transitEncryptionEnabled: true,
});import { Stack, App } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as elasticache from 'aws-cdk-lib/aws-elasticache';
new elasticache.CfnReplicationGroup(this, 'Redis', {
replicationGroupDescription: 'session cache',
engine: 'redis',
cacheNodeType: 'cache.t3.micro',
transitEncryptionEnabled: true,
authToken: 'a-strong-auth-token-at-least-16-chars',
});CDK Insights pinpoints the exact file and line in your CDK source for every finding, so you can jump straight to the fix.
Affected resource types
AWS::ElastiCache::ReplicationGroupIntentional? Suppress this finding
Sometimes a flag is deliberate — a genuinely public endpoint, say. You can dismiss elasticache-auth-token-missing and the reason is kept in the report, not silently hidden.
In .cdk-insights.json:
{
"ignoreRules": [
{ "id": "elasticache-auth-token-missing", "reason": "Why this is intentional" }
]
}Or inline in your CDK code:
Validations.of(scope).acknowledge({
id: 'cdk-insights::elasticache-auth-token-missing',
reason: 'Why this is intentional',
});Use the rule ID elasticache-auth-token-missing shown above — not the CDK-* ID from SARIF / GitHub code scanning. To dismiss every finding on one construct instead, use ignorePaths. Suppression docs →
Catch this in your stack
$ npx cdk-insights scanCDK Insights runs this and 118+ other rules locally against your synthesised CDK app — free, no account, your code never leaves your machine.