aws / aws-lambda-dotnet

Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Apache License 2.0
1.57k stars 479 forks source link

Support for .NET Core 2.1 #272

Closed raRaRa closed 6 years ago

raRaRa commented 6 years ago

Hi,

Just curious if .NET Core 2.1 support will become available soon after it has been released, or can we expect it taking a longer time, like what happened with .NET Core 2.0? Are there any significant changes that need to be made to Lambda?

On another note, are there any plans to support .NET Core 2.1 RC1? 🤔

Thanks!

vellozzi commented 6 years ago

We're working hard to make .NET Core 2.1 available in Lambda.
I'm unable to comment on any specific timeline though.
There are no plans to support .NET Core 2.1 RC1.

raRaRa commented 6 years ago

FYI .NET Core 2.1.0 was officially released today. Can't wait to upgrade!

Kralizek commented 6 years ago

@raRaRa was it? I couldn't find it anywhere

danielabbatt commented 6 years ago

All the nuget packages have been updated. Still no announcement by the looks of it.

zolrath commented 6 years ago

Announcement just went up! https://blogs.msdn.microsoft.com/dotnet/2018/05/30/announcing-net-core-2-1/

daolavi commented 6 years ago

Is .net core 2.1 available in Lambda ? According to this article, it looks like not available yet.

vellozzi commented 6 years ago

It isn't available yet. That blog is the right place to look for the announcement though.

raRaRa commented 6 years ago

How's the progress coming along? 😁

vellozzi commented 6 years ago

Still working on it...

normj commented 6 years ago

Out of curiosity what features in 2.1 are you most excited for when it comes to Lambda?

raRaRa commented 6 years ago

@normj Mostly runtime & networking performance improvements, HttpClientFactory, and Span<T>, Memory<T>, and friends.

raRaRa commented 6 years ago

On another note, are you working on supporting .NET Core 2.1.1 from the start, which has some neat bug fixes, or can we expect 2.1.0 to be supported first?

And thanks for keeping us in the loop, much appreciated. Love the excellent work you guys have done so far. ❤️

ferugi commented 6 years ago

The thing I'm most looking forward to with .NET Core 2.1 is Tired Compilation as I understand it should offer some significant improvements on cold start time.

federicorinaldi commented 6 years ago

Based on the end of life of .NET Core 2 after the release of 2.1 can we get an estimation when this is going to be ready to plan the upgrades?

jasonwhetton commented 6 years ago

Any release date in sight yet? Waiting on this to fix compatibility issues with MongoDB atlas.

melih154 commented 6 years ago

Interested in below features.

raRaRa commented 6 years ago

Seems like 2.1 was released 22 minutes ago!

FYI

As mentioned in [3], we’re working on the .NET Core 2.1.1 update that came out in late June. We’ll make it available in the AWS Lambda environment as soon as we can.

normj commented 6 years ago

.NET Core 2.1 for Lambda was just released. https://aws.amazon.com/blogs/developer/aws-lambda-net-core-2-1-support-released/

aaronhudon commented 6 years ago

@normj how long until the VSTS AWS Lambda Deploy Function extension is updated to allow runtime 2.1 selection?

image

normj commented 6 years ago

@aaronhudon We plan on getting VSTS updated next week with the new enum. Unfortunately it got batched up with some other VSTS features we have coming out with the next release. Let me know if that is going to be a problem and I can see what we can work out.

raRaRa commented 6 years ago

Seems like .NET Core 2.1.2 is now out with some security update. Is it going to be difficult/time consuming process for Lambda to support the latest version of .NET Core?

normj commented 6 years ago

@raRaRa We are working on the 2.1.2 but I'm not sure of the timing when it will be in Lambda.

virzak commented 6 years ago

I upgraded the AWS Toolkit to version 1.14.4.0, Microsoft.AspNetCore.App to 2.1.0 and Amazon.Lambda.Tools to 2.2.0

When I Publish to AWS Lambda the dialog shows the correct framework (2.1) and deploys smoothly.

However when I access the API, I get an error and the CloudWatch says:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
/
- Alternatively, install the framework version '2.1.0'.
Failed to execute the Lambda function. The dotnet CLI failed to start with the provided deployment package. Please check CloudWatch logs for this Lambda function to get detailed information about this failure.: LambdaException

Am I doing something wrong?

normj commented 6 years ago

In your serverless.template file for the AWS::Serverless::Function resource did you update the Runtime property to dotnetcore2.1. Sorry we should have put that in the blog post.

virzak commented 6 years ago

@normj That was the missing piece. Thanks!

ferugi commented 6 years ago

I've found that for Tiered Compilation to be enabled, it needs to be set as a AWS Function environment variable. E.g. in serverless.template:

"Environment": {
    "Variables": {
        "COMPlus_TieredCompilation" : 1
    }
}

Seems to have a noticable performance improvement on cold start.

raRaRa commented 6 years ago

@ferugi Super interesting, thanks for sharing. Do you know if there are any known side effects of using tiered compilation, e.g. could it actually cause overall worse performance while the startup time becomes faster.

normj commented 6 years ago

@ferugi Any chance you can quantify the performance improvement? I didn't really notice much in my testing but I might not have had enough of a real world scenario.

ferugi commented 6 years ago

Sorry for the slow response. @normj I don't have a good real world example, but a quick test with Lambda and API Gateway gave these results (128mb memory). @raRaRa I don't know enought to give you a real answer. That said, in the test I ran it did look like there was a bit more variation in response time of subsequent calls when Tiered Compilation was enabled.

raRaRa commented 6 years ago

@normj Any update on support for .NET Core 2.1.2? Thanks!

vellozzi commented 6 years ago

No updates. We're still working on getting it out as soon as we can.

ayalbelling commented 6 years ago

[SOLVED] By deleting and recreating the instance of my app in Beanstalk and then redeploying.

Apparently Dotnet Core 2.1 is supported native on beanstalk according to the link below. But I still get the "Process Failure" message as if it isn't.

https://aws.amazon.com/about-aws/whats-new/2018/06/aws-elastic-beanstalk-supports--net-core-2-1-on-windows-server-p/

raRaRa commented 6 years ago

https://blogs.msdn.microsoft.com/dotnet/2018/08/02/tiered-compilation-preview-in-net-core-2-1/

genifycom commented 6 years ago

Once you have updated to 2.1.2 then 2.1.0 will no longer allow dynamic changes to cshtml files. I get this error https://github.com/dotnet/core/issues/1728

This has forced us to upgrade to 2.1.2 to get back productivity. Unfortunately we can no longer deploy to Lambda so we are currently stuck.

RobertPaulson90 commented 6 years ago

Also quite stuck without the latest patch. Will 2.1.1 / 2.1.2 be ready soon, or should we consider changing our architecture entirely, to self-built docker containers with Fargate/self-hosted Kubernetes?

vellozzi commented 6 years ago

We're working to get 2.1.2 released as soon as possible. You shouldn't need to change anything.

virzak commented 6 years ago

In the meantime 2.1.3 is out.

Just out of curiosity, what's involved in upgrading to latest .NET major or minor version? Feels like a continuous catch-up cycle.

vellozzi commented 6 years ago

There are a lot of steps behind the scenes to build, test, verify and deploy new runtimes into AWS Lambda.

You're totally right about the catch-up cycle thing. Improving that is one of our top priorities for AWS Lambda .NET Core support.

PaulDMendoza commented 6 years ago

2.1.4 is out now.

vellozzi commented 6 years ago

We're working on that now instead. We'll keep you posted.

melih154 commented 5 years ago

Found out that this issue is fixed with .NET Core 2.1.4.

Seems like a good reason to get Lambda Environment upgraded to 2.1.4 soon :) - as it may help on the good use of underlying CPU resources.

Thanks for the work.

raRaRa commented 5 years ago

@melih154 Wow, I wasn't aware of this issue. Is the new socket enabled by default in .NET Core 2.1?

We really need .NET Core 2.1.4 support. 🍕

raRaRa commented 5 years ago

And 2.1.5 is out. https://blogs.msdn.microsoft.com/dotnet/2018/10/02/net-core-october-2018-update/

normj commented 5 years ago

Lambda is deployed with 2.1.4 and 2.1.5 is in the development pipeline. The Lambda README has been updated with a new table tracking the current versions. Hope that helps with the visibility.

raRaRa commented 5 years ago

It sure does! Thank you so much.