You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Connect-ExchangeOnline from AWS PowerShell lambda throws PSRemotingTransportException #849
I am trying to connect to exchange from AWS Powershell Lambda function. The script is working fine locally but throws below error when executed from AWS.
{
"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()"
]
}
}
Please refer the existing issues aws/aws-tools-for-powershell#203 and #332 for details about this error and possible resolution. This error is related to OpenSSL library. Let me know if these help.
I have created a AWS openssl layer to the lambda function. openssl support is available to lambda but i am getting the same error. Do i need to have my own container?
Activity
ashishdhingra commentedon Apr 8, 2021
Hi @geekganesh,
Good morning.
Please refer the existing issues aws/aws-tools-for-powershell#203 and #332 for details about this error and possible resolution. This error is related to OpenSSL library. Let me know if these help.
Thanks,
Ashish
geekganesh commentedon Apr 12, 2021
Hi @ashishdhingra
I have created a AWS openssl layer to the lambda function. openssl support is available to lambda but i am getting the same error. Do i need to have my own container?
Regards
Ganesh
nickadam commentedon Feb 4, 2022
PSWSMan rewrites shared object files when running Install-WSMan. I have not been able to get it to work with a zip. Since it takes ~1 min to connect to exchange online, I've decided to build a container image, https://github.com/nickadam/powershell-lambda, https://github.com/nickadam/exo-lambda. It's slow but it works.