aws network_error ai_generated true

Could not connect to Redis/Memcached endpoint: Connection timed out

ID: aws/aws-elasticache-connection

Also available as: JSON · Markdown
85%Fix Rate
87%Confidence
75Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
2 active

Root Cause

Application cannot connect to ElastiCache cluster, usually due to VPC, security group, or subnet configuration.

generic

Workarounds

  1. 88% success Ensure the client is in the same VPC and security group allows inbound on the cache port
    Check security group allows inbound TCP on port 6379 (Redis) or 11211 (Memcached) from the client's security group

    Sources: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/accessing-elasticache.html

  2. 80% success Verify subnet route tables allow traffic between the client and ElastiCache subnets
    Check that both the client and ElastiCache are in subnets with proper route table entries for the VPC CIDR

    Sources: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-vpc-accessing.html

Dead Ends

Common approaches that don't work:

  1. Try to connect to ElastiCache from outside the VPC 95% fail

    ElastiCache is VPC-only by default and not accessible from the public internet

  2. Reboot the ElastiCache cluster to fix connection issues 80% fail

    If the issue is network configuration, rebooting doesn't change security groups or subnet routing

Error Chain

Frequently confused with: