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

質問済み 1年前667ビュー
2回答
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
回答済み 1年前
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

回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ