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

posta un anno fa667 visualizzazioni
2 Risposte
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
con risposta un anno fa
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

con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande