© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•9mo ago•
2 replies
Ykarus

✅ Redis Cloud in AWS Lambda

Hello,

Im having some troubles connecting to my Redis cache, hosted on Redis Cloud.
In my setup code, I create a connection object as such:

services.AddSingleton<IConnectionMultiplexer>(_ => ConnectionMultiplexer.Connect(
   new ConfigurationOptions{
     EndPoints = { {emailVerificationCacheEndpoint, 19041} },
     User ="default",
     Password = emailVerificationCachePassword,
     AbortOnConnectFail = false,
     ConnectTimeout = 5000,
     KeepAlive = 180,
  }));
services.AddSingleton<IConnectionMultiplexer>(_ => ConnectionMultiplexer.Connect(
   new ConfigurationOptions{
     EndPoints = { {emailVerificationCacheEndpoint, 19041} },
     User ="default",
     Password = emailVerificationCachePassword,
     AbortOnConnectFail = false,
     ConnectTimeout = 5000,
     KeepAlive = 180,
  }));


When I run my test code locally, through a docker container, everything works nicely.
However, when I run it on an AWS Lambda, through the same Docker container, I get a connection timeout error.
"errorType": "RedisConnectionException",
"errorMessage": "The message timed out in the backlog attempting to send because no connection became available (5000ms) - Last Connection Exception: It was not possible to connect to the redis server(s) "redis-..."
"errorType": "RedisConnectionException",
"errorMessage": "The message timed out in the backlog attempting to send because no connection became available (5000ms) - Last Connection Exception: It was not possible to connect to the redis server(s) "redis-..."


Why could that be? How could I even go about debugging this?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ AWS Elasticache - Local Redis
C#CC# / help
14mo ago
✅ async/await Task in an AWS Lambda
C#CC# / help
3y ago
Aws Lambda Server Hosting .net Web API
C#CC# / help
16mo ago
❔ AWS DDB and Lambda integration doesn't work
C#CC# / help
3y ago