When executed on within AWS/Lambda, the following line throws a PlatformNotSupportedException
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
This function is used by ConnectionSettings and a few other classes to modify their behavior by platform (such as attempting to use unix sockets vs tcp). While I have an open support issue with the Lambda team, I don't believe they will resolve this anytime soon.