Hello, Is there any news?
I’m having the same issue with my lambda
{
"error": "failed to ping MongoDB: server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: live-shard-00-00.ryh7x.mongodb.net:27017, Type: Unknown }, { Addr: live-shard-00-01.ryh7x.mongodb.net:27017, Type: Unknown }, { Addr: live-shard-00-02.ryh7x.mongodb.net:27017, Type: Unknown }, ] }",
"level": "error",
"msg": "failed to connect to database",
"time": "2023-06-20T13:54:38Z"
}
Some details about my lambda
go 1.19
go.mongodb.org/mongo-driver v1.11.4
and my DB
Version: 5.0.18
Region: AWS Ireland (eu-west-1)
Cluster tier: M10 (General)
I have two stage test and prod. The test stage is working correctly, but the prod stage is throwing an error, even though both stages have the same configuration. I also added the IP of my VPC into IP Access List for two stages.