[Mono-dev] Amazon Lambda With Mono
james.wheeler.pe
james.wheeler.pe at gmail.com
Tue Nov 22 13:26:40 UTC 2016
Thought I posted this yesterday but can't find it.
Forgive me if it shows up twice.
We have a lot of C# code that we would like to run under Amazon Lambda.
Mono would seem to be the most effective way to achieve this.
I have been able to get simple applications to run but things fail
when I try to use libraries that ultimately make a call via WebRequest.
Here is a partial stack trace....
libc : at (wrapper managed-to-native) System.Platform:uname (intptr)
at System.Platform.CheckOS () [0x00022] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Platform.get_IsMacOS () [0x0000a] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.WebRequest.GetSystemWebProxy () [0x00149] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.WebRequest.GetDefaultWebProxy () [0x0003f] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.WebRequest.get_DefaultWebProxy () [0x00024] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.GlobalProxySelection.get_Select () [0x00000] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.HttpWebRequest..ctor (System.Uri uri) [0x0008d] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at (wrapper remoting-invoke-with-check) System.Net.HttpWebRequest:.ctor
(System.Uri)
at System.Net.HttpRequestCreator.Create (System.Uri uri) [0x00000] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at System.Net.WebRequest.Create (System.Uri requestUri) [0x00022] in
<bd46d4d4f7964dfa9beea098499ab597>:0
at Amazon.Runtime.Internal.HttpRequest..ctor (System.Uri requestUri)
[0x00006] in <5fa4eac2df714faba4a923294bf63545>:0
at Amazon.Runtime.Internal.HttpWebRequestFactory.CreateHttpRequest
(System.Uri requestUri) [0x00000] in <5fa4eac2df714f
aba4a923294bf63545>:0
at Amazon.Runtime.Internal.HttpHandler`1[TRequestContent].CreateWebRequest
(Amazon.Runtime.IRequestContext requestConte
xt) [0x0000e] in <5fa4eac2df714faba4a923294bf63545>:0
at Amazon.Runtime.Internal.HttpHandler`1[TRequestContent].InvokeSync
(Amazon.Runtime.IExecutionContext executionContext
) [0x00020] in <5fa4eac2df714faba4a923294bf63545>:0
at Amazon.Runtime.Internal.PipelineHandler.InvokeSync
(Amazon.Runtime.IExecutionContext executionContext) [0x0000e] in
<5fa4eac2df714faba4a923294bf63545>:0
at Amazon.Runtime.Internal.Unmarshaller.InvokeSync
(Amazon.Runtime.IExecutionContext executionContext) [0x00000] in <5f
a4eac2df714faba4a923294bf63545>:0
at Amazon.Runtime.Internal.PipelineHandler.InvokeSync
(Amazon.Runtime.IExecutionContext executionContext) [0x0000e] in
<5fa4eac2df714faba4a923294bf63545>:0
at Amazon.SQS.Internal.ValidationResponseHandler.InvokeSync
(Amazon.Runtime.IExecutionContext executionContext) [0x0000
0] in <77e6e07db95447a7b69000e72919cece>:0
at Amazon.Runtime.Internal.PipelineHandler.InvokeSync
(Amazon.Runtime.IExecutionContext executionContext) [0x0000e] in
<5fa4eac2df714faba4a923294bf63545>:0
On the machine I used to create the package to deploy to Amazon Lambda I
have mono installed and on this machine all the applications work
flawlessly.
Installing mono for Amazon Lambda is not an option.
I used mkbundle --deps .... to build the package to deploy to Amazon Lambda.
For a while I suspected that the issue might be due to a missing or empty
mono certificate store. However I implemented the ICertificatePolicy
interface and accepted everything and that has no affect.
I'd really like to get this working because Amazon Lambda has many practical
benefits.
Any help or suggestions would be greatly appreciated.
Also, and don't know if this is related or relevant, but I cannot get the
--static flag to work with mkbundle. The link stage always fails saying it
cannot find -lmono-2.0.
--
View this message in context: http://mono.1490590.n4.nabble.com/Amazon-Lambda-With-Mono-tp4669222.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list