Calling .Net code from Python Lambda - Is it possible

0

Hello,

I am desperately looking for help on this. Using PythonNet package I am trying to call .Net code from a Python Lambda function. But while trying to deploy that to .Net Lambda I get the following error saying that it is unable to load the runtime.

Response { "errorMessage": "Failed to create a .NET runtime (coreclr) using the\n parameters {}.", "errorType": "RuntimeError", "requestId": "", "stackTrace": [ " File "/var/lang/lib/python3.9/importlib/init.py", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n", " File "<frozen importlib._bootstrap>", line 1030, in _gcd_import\n", " File "<frozen importlib._bootstrap>", line 1007, in _find_and_load\n", " File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked\n", " File "<frozen importlib._bootstrap>", line 680, in _load_unlocked\n", " File "<frozen importlib._bootstrap_external>", line 850, in exec_module\n", " File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed\n",

Thanks, Haripriya

gefragt vor einem Jahr667 Aufrufe
2 Antworten
0

Hello,

In short, yes you can run .NET code in lambda. It looks like you are trying to use the .NET core runtime which makes sense. What version of .NET are you using? Have you looked at the doc below yet as well? https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Cloud_G
beantwortet vor einem Jahr
0

Thank you Cloud_G for the prompt reply. I am using .Net core 3.1 [assembly: TargetFramework(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")] Could you please help me with a sample Lambda that calls .Net code in Python or containerizing to include both run times and successfully executing the lambda?

Thanks, Haripriya

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen