Closed andybirenzi closed 3 years ago
Hi @andybirenzi,
Looks like there was a similar issue https://github.com/aws/aws-lambda-dotnet/issues/332 opened long time back. As suggested in that issue, please refer the forum article https://forums.aws.amazon.com/thread.jspa?messageID=918094 for possible solution. Kindly note that Lambda works on minimal RHEL image. Let me know if it works for you.
Thanks, Ashish
The suggestion solution didn't work for me, I'm not able to find missing dependencies. I'm on MacOS.
The missing deps are: libcrypto.so.1.0.0 libssl.so.1.0.0
I copied them from /opt/microsoft/powershell/6/ to ~/.nuget/packages/microsoft.powershell.native/6.1.0/runtimes/linux-x64/native. Republished and everything worked.
Please suggest if you get it working on Mac
The suggestion solution didn't work for me, I'm not able to find missing dependencies. I'm on MacOS.
The missing deps are: libcrypto.so.1.0.0 libssl.so.1.0.0
I copied them from /opt/microsoft/powershell/6/ to ~/.nuget/packages/microsoft.powershell.native/6.1.0/runtimes/linux-x64/native. Republished and everything worked.
Please suggest if you get it working on Mac
@andybirenzi Looks like these dependencies are related to Open SSL. Article https://gist.github.com/aklap/e885721ef15c8668ed0a1dd64d2ea1a7 might be helpful. I do see this as a PowerShell specific issue also documented on https://github.com/PowerShell/PowerShell/issues/5561.
This issue has not recieved a response in 2 weeks. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
Description
I'm have following script in my pwsh lambda function:
Reproduction Steps
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $secureStringPwd
Connect to Exchange Online
Connect-ExchangeOnline -Credential $creds
Logs
"errorType": "PSRemotingTransportException", "errorMessage": "This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.", "stackTrace": [ "at Amazon.Lambda.PowerShellHost.PowerShellFunctionHost.ExecuteFunction(Stream inputStream, ILambdaContext context)", "at lambda_method(Closure , Stream , Stream , LambdaContextInternal )" ], "cause": { "errorType": "DllNotFoundException", "errorMessage": "Unable to load shared library 'libpsrpclient' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibpsrpclient: cannot open shared object file: No such file or directory", "stackTrace": [ "at System.Management.Automation.Remoting.Client.WSManNativeApi.WSManInitialize(Int32 flags, IntPtr& wsManAPIHandle)", "at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.WSManAPIDataCommon..ctor()" ] }
Environment
Name Value
PSVersion 7.1.2 PSEdition Core GitCommitId 7.1.2 OS Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_… Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
Resolution
I just need PowerShell to connect to ExchangeOnline through ModenAuth
This is a :bug: bug-report