Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net Core (2.1)- Lambda function does work while 2.2 doesn't? #478

Closed
RoyiNamir opened this issue Jun 16, 2019 · 3 comments
Closed

.Net Core (2.1)- Lambda function does work while 2.2 doesn't? #478

RoyiNamir opened this issue Jun 16, 2019 · 3 comments
Labels
duplicate This issue is a duplicate. guidance Question that needs advice or information.

Comments

@RoyiNamir
Copy link

RoyiNamir commented Jun 16, 2019

I've created a simple empty AWS Lambda function using .Net Core 2.1 :

enter image description here

Here is the folder structure :

enter image description here

(here is the csproj)

And a FunctionHandler which gets DI and invoke some dummy method :

enter image description here

Now let's run the "Mock Lambda Test Tool" , we can see that it works :

enter image description here

So where is the problem?

I've read here that 2.2 is supported :

This means you can now author Lambda functions using .NET Core 2.2 and
.NET Core 3.0 preview. Amazon.Lambda.RuntimeSupport is available as
source code on GitHub, or as a NuGet package.

And so , I've created a new empty lambda project but with 2.2 :

enter image description here

Same code. But now when I run "Mock Lambda Test Tool" , I get an error :

AWS .NET Mock Lambda Test Tool (0.9.2) Unknown error occurred causing
process exit: Failed to find a deps.json file at
Amazon.Lambda.TestTool.Runtime.LocalLambdaRuntime.Initialize(String
directory) in
E:\JenkinsWorkspaces\Lam\LambdaSandboxCoreCLRApi\Tools\LambdaTestTool\Amazon.Lambda.TestTool\Runtime\LocalLambdaRuntime.cs:line
50 at Amazon.Lambda.TestTool.Program.Main(String[] args) in
E:\JenkinsWorkspaces\Lam\LambdaSandboxCoreCLRApi\Tools\LambdaTestTool\Amazon.Lambda.TestTool\Program.cs:line
46 Press any key to exit

Here is the error :

enter image description here

Question:

Why is that? I didn't have any deps.json file in 2.1 .

So why do I need it in 2.2 ?
Also, what is this path appearing in the error: E:\JenkinsWorkspaces... ?
I don't have Jenkins nor something like it.

@RoyiNamir
Copy link
Author

Update , I think it's a bug : but I found the reason :

https://stackoverflow.com/questions/56619863/net-core-2-1-lambda-function-does-work-while-in-2-2-it-doesnt

@normj
Copy link
Member

normj commented Jun 25, 2019

Unfortunately the mock testing tool doesn't currently support Lambda functions using the custom runtime feature. We have a GitHub issue tracking this #427

@normj normj added the guidance Question that needs advice or information. label Jun 25, 2019
@klaytaybai klaytaybai added the duplicate This issue is a duplicate. label Jul 15, 2019
@klaytaybai
Copy link

I'm going to close this out as a duplicate in favor of #427.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate. guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

3 participants