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

demandé il y a un an668 vues
2 réponses
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
répondu il y a un an
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

répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions