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

Support to .NET Core 2.0 #149

Closed
AlbertoMonteiro opened this Issue Aug 9, 2017 · 114 comments

Comments

Projects
None yet
@AlbertoMonteiro

AlbertoMonteiro commented Aug 9, 2017

.NET Core 2.0 was just release https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-core-2-0/

When AWS Lambda will support .NET Core 2.0?

@normj

This comment has been minimized.

Member

normj commented Aug 9, 2017

Looks like it is not quite out yet but close.

I can't give you release time but we know how important the .NET Core 2.0 release is.

@normj normj added the Enhancement label Aug 9, 2017

@Kralizek

This comment has been minimized.

Kralizek commented Aug 10, 2017

What's going to be the strategy?

Are we going to have a new runtime to choose from? Or will all .net lambda automatically upgraded to .net core 2.0?

@bjorg

This comment has been minimized.

Contributor

bjorg commented Aug 10, 2017

I will be at re:Invent when it's announced screaming my head off like I did last year! :)

@AlbertoMonteiro

This comment has been minimized.

AlbertoMonteiro commented Aug 10, 2017

@normj the issue is back!!! dotnet/announcements#24

@genifycom

This comment has been minimized.

genifycom commented Aug 10, 2017

Norm, will Razor continue to be an issue with .NET Core 2.0 or is it too early to say?

@slang25

This comment has been minimized.

Contributor

slang25 commented Aug 10, 2017

Just to be clear, .NET Standard 2.0 has been released, .NET Core 2.0 is still in the works.

@normj

This comment has been minimized.

Member

normj commented Aug 10, 2017

@genifycom I can't guarantee anything yet but in .NET Core 2.0 Razor views can be precompiled at packaging time which solves the problem Lambda has with Razor views in our current runtime. Also precompilation will be critical to keep the cold startup time down.

@Kralizek Please don't take anything in this thread as an announcement for .NET Core 2.0 support in Lambda, just know we realize how important that release is. Given that disclaimer our next iteration for .NET Core Lambda will be a new runtime to pick. We wouldn't want to automatically upgrade existing functions. .NET Core 2.0 does have some breaking changes and developers will need to test their functions on .NET Core 2.0.

@bjorg I should be at re:Invent as well. I'd love to catch up and hearing what you guys are up to with AWS.

@AlbertoMonteiro

This comment has been minimized.

AlbertoMonteiro commented Aug 10, 2017

Thanks for the feedback @normj

@Kralizek

This comment has been minimized.

Kralizek commented Aug 11, 2017

@normj don't worry! We are pretty happy with .NET Core 1.0 so far :) but glad to know which direction you would be taking if you were to support a new runtime version!

@damianh

This comment has been minimized.

damianh commented Aug 14, 2017

@gotmike

This comment has been minimized.

gotmike commented Aug 16, 2017

previously, it was mentioned that Lambda would support all LTS versions of .net core...

now, v1.1.2 is LTS (https://www.microsoft.com/net/core/support)

when will this be supported? or is it already?

@normj

This comment has been minimized.

Member

normj commented Aug 24, 2017

@gotmike It has been said that Lambda only supports LTS versions of their supported runtimes not that all LTS versions will be supported.

.NET Core 1.1 has some low build infrastructure changes that makes it not a simple engineering effort and at this point we want to focus our engineering effort on the new versions of .NET Core which I'm sure most of you would prefer.

I'm going to close this issue because the need is obvious and when we have something to announce there will be lots of messaging.

@normj normj closed this Aug 24, 2017

@josiahpeters

This comment has been minimized.

josiahpeters commented Aug 29, 2017

@normj Can you suggest the best way to follow updates for aws-lambda-dotnet? Should I try following one of the AWS Blogs like: https://aws.amazon.com/blogs/aws/category/aws-lambda/ or https://aws.amazon.com/blogs/developer/category/net/

I'm very interested in future announcements for .NET Core 2.0 support for lambdas and other similar developments. If there isn't an official information channel to follow, I can go ahead and setup a Google Search alert for ".NET Core 2.0 Lambda" or something similar.

@normj

This comment has been minimized.

Member

normj commented Aug 31, 2017

For AWS .NET related news I would suggest our .NET Blog https://aws.amazon.com/blogs/developer/category/net/ and our twitter handle https://twitter.com/awsfornet. That is where I post .NET news.

@peterdeme

This comment has been minimized.

peterdeme commented Aug 31, 2017

Is there any particular reason why only LTS versions are supported? I mean if we have a .NET Core 2 app in our solution and we want another app as a Lambda, and they both have our DataAccessLayer referenced, we need to have the DataAccessLayer .NETStandard 1.6 so the Lambda project can reference it.
image

That actually blocks us from having EF Core upgraded. That's a pretty huge blocker, I'm sure we are not the only dev team facing this problem. I just don't understand it, because even Beanstalk supports it.

@gotmike

This comment has been minimized.

gotmike commented Aug 31, 2017

@peterdeme -- yes, we are also needing the EF features in (at least) v1.1

seems to me that there must be something going on that's causing problems b/c it's been a really long time now and the "LTS" thing doesn't really seem to be true. before, the guidance was to check for "LTS Support" on the MS page, but apparently that's not the case anymore.

@normj -- where can we track the LTS part for the runtime? i can't find that anywhere.

specifically, we need to be able to implement complex types in entity framework, something that apparently is only available in v1.1 and above. until then, we're forced to use an Azure App Service.

@wilsonat

This comment has been minimized.

wilsonat commented Aug 31, 2017

I wish there was a way to get a little more transparency with the .NET Core support plans/timeline. I get that there's a lot of behind-the-scenes work that goes into hosting a new version of the runtime, but, it would at least be nice to have some sort of target---even if it's just 2017 Q4.

My team is starting to move pretty hard into the serverless space, and the fact that we don't have any information about Core 2.0 support makes me start to question how viable AWS will be for our .NET team.

We've been really happy with the .NET support, so far, (and appreciate all your hard work), but the lack of a public road map makes it really difficult to plan.

@normj

This comment has been minimized.

Member

normj commented Aug 31, 2017

I understand your frustration and believe me we are pushing as hard as we can for the next iteration of .NET Core Lambda. I apologize I can't talk in much detail but I'll try and shed as much light as I can.

Lambda runtimes are more complicated than a Beanstalk environment. For a runtime we have to construct a hosting environment for the code. Where as Beanstalk we basically run the latest installer on the new AMI iteration.

We learned a lot from our current .NET Core Lambda implementation and want to make sure we take those lessons learned into the next version. Remember when we launched Lambda support the dotnet CLI wasn't even GA yet. So we want to do some rework around the hosting environment to handle features like Razor pages and localization resources. We need to put that extra effort into it now because once a runtime goes live it is hard to make changes that won't affecting any currently running Lambda functions.

Also with a new runtime it involves coordinating with a lot of teams each with their own schedule. And we all know schedules get shifted around so predicting a date is difficult and at Amazon we don't like to talk about a date until we are sure we can't make that date.

I know there is a ton of version difficulties with .NET Core 1.x. That is primary due to the fact in .NET Core 1.x NuGet packages took a dependency on .NETStandard.Library NuGet package even when they were targeting .NET Standard which pinned the package to a specific version of .NET Core. The good news for the future is libraries targeting .NET Standard 2.0 no longer have to declare a dependency to .NETStandard.Library NuGet package which will, in theory, unpin them from a specific version of .NET Core.

@damianh

This comment has been minimized.

damianh commented Sep 6, 2017

Not sure where to say this but... if you are going to encourage full-.net-apps-web-apps-in-a-lambda (which is indeed very useful) then the lambda function deployment package size limit of 50MB will need to be raised. Azure has no such limits.

@michaelthwaite

This comment has been minimized.

michaelthwaite commented Oct 10, 2017

Any update on this? My development environment is constantly rolling forwards into 2.0 land - I have to keep manually backing it out and, unfortunately, that means some components can no longer be supported on Lambda without major package surgery!

An update would be welcome.

@rbbullard42

This comment has been minimized.

rbbullard42 commented Oct 12, 2017

I'm really excited to see what you guys have once this is released. Big changes and improvements from .NET Core 1.0 to .NET core 2.0. Good luck and I appreciate the extra hard work and diligence you guys are putting into this project.

@matt-hammond

This comment has been minimized.

matt-hammond commented Oct 18, 2017

It would be really useful to understand when this is likely to land, even at a high level, to help plan our work. No need for a firm commitment, an indication of the earliest we might expect it in terms of weeks/months/quarters would be very helpful.

Many thanks.

@Thaina

This comment has been minimized.

Thaina commented Oct 18, 2017

@normj I think we could do things like it had been done for nodejs. There was a time that nodejs4 and nodejs6 need to be selected separately. Actually I think you should support every language in this scheme, has 2-3 versions that stable to choose from and deprecate the old one one by one. These was far more better for people who want to start working on better environment

@damianh

This comment has been minimized.

damianh commented Oct 18, 2017

I suspect the radio silence will last until re:invent at end of Nov for marketing reasons. Quite annoying that we'll have to wait another month to find out what the plans are.

@liam-reilly

This comment has been minimized.

liam-reilly commented Oct 30, 2017

I could really do with knowing when .NET Core 2 is going to be available in Lambda. It influences a project I am just preparing to kick off. If it's not going to be anytime soon I will make other choices but if it might be released by early december say then .NET Core 2 lambdas here we come!

@normj

This comment has been minimized.

Member

normj commented Jan 16, 2018

😁 😌 😃 😁 😂 🙌 (As promised lots of happy emojis)

.NET Core 2.0 Lamdba support is out, and version 1.14.0.0 of the AWS Toolkit for Visual Studio is released to support it! Here is my blog post about the new release: https://aws.amazon.com/blogs/developer/aws-lambda-net-core-2-0-support-released/

Also, you might want to take a look at the client tooling change log for some more details updates. https://github.com/aws/aws-lambda-dotnet/blob/master/RELEASE.CHANGELOG.md

For anybody using the ASP.NET Core bridge I have a blog post I'm finishing up that I hope to get out tomorrow with more details. The short update is the 2.0.0 version of Amazon.Lambda.AspNetCoreServer is retargeted to .NET Core 2.0 and is now GA. There is a new blueprint in Visual Studio demonstrating running an ASP.NET Core Web Application with Razor pages.

I'm going to close this issue as we now have support for .NET Core 2.0. For new issues and questions please open a new GitHub issue.

Thanks everybody for your patiences and enjoy the new runtime!!!

@normj normj closed this Jan 16, 2018

@josiahpeters

This comment has been minimized.

josiahpeters commented Jan 16, 2018

@jonathan3698

This comment has been minimized.

jonathan3698 commented Jan 16, 2018

Oh my god.

This made my day. I have been waiting for this since a VERY LONG TIME.

Thank you!

@AbbTek

This comment has been minimized.

AbbTek commented Jan 16, 2018

@Thaina

This comment has been minimized.

Thaina commented Jan 16, 2018

Thank you very much

@Kralizek

This comment has been minimized.

Kralizek commented Jan 16, 2018

OMG thanks so much!!

@alexzaytsev-newsroomly

This comment has been minimized.

alexzaytsev-newsroomly commented Jan 16, 2018

@normj In the presentation back at re: invent you mentioned that x-ray will be available for .net core 2.0. Now that lambda support is out, when can we expect x-ray? :)

@normj

This comment has been minimized.

Member

normj commented Jan 16, 2018

@alexzaytsev-newsroomly We were able to pull in the Lambda release sooner than we could finish X-Ray. We didn't want to make anybody wait any longer for the Lambda release so we pushed out the Lambda release without X-Ray. The .NET Core X-Ray release will follow very soon.

@honify

This comment has been minimized.

honify commented Jan 16, 2018

@normj you are awesome

@hounddog22030

This comment has been minimized.

hounddog22030 commented Jan 16, 2018

@normj

Thanks for getting this out. We're having an issue packaging in CodeBuild. I've created an issue @ #199

Wondering if it's a Lambda library problem or a AWS CodeBuild problem? Or perhaps we're doing something wrong. This was working with .net core 1.0.

Thanks

@raRaRa

This comment has been minimized.

raRaRa commented Jan 16, 2018

Awesome news. How soon will you support Microsoft.AspNetCore.All version 2.0.5? I hit my first blocker which is:
Project is referencing version 2.0.5 of Microsoft.AspNetCore.All which is newer than 2.0.3, the latest version available in the Lambda Runtime environment. Please update your project to use version 2.0.3 and then redeploy your Lambda function.

It's no problem for me to downgrade, just curious how soon you guys plan to support newer versions. Thanks.

@damianh

This comment has been minimized.

damianh commented Jan 16, 2018

@raRaRa Can you get around that with self-contained deployment?

@mattlund

This comment has been minimized.

mattlund commented Jan 16, 2018

Yes yes yes - cheers for .net core 2.0 support. Thanks AWS guys!!!!!!!!!!!!!!!!!!!!!!

@dls314

This comment has been minimized.

dls314 commented Jan 16, 2018

@damianh said:

@raRaRa Can you get around that with self-contained deployment?

I've been trying and I can't get self-contained deployment to work. I've been using the linux-x64 RID to create a SCD and I get an error trying to test such a fn like this

Failed to bind to CoreCLR at '/var/task/libcoreclr.so'

I can see the libcoreclr.so in my zip package, but maybe that's not a good RID to use?

Update:
One thing I've noticed is that for SCDs the [appname].runtimeconfig.json file isn't generated, which the spec seems to confirm (https://github.com/dotnet/cli/blob/master/Documentation/specs/runtime-configuration-file.md). However, without this file, lambda generates an error like Could not find the required 'Local.ScdLambdas.runtimeconfig.json'. This file should be present at the root of the deployment package.

@01binary

This comment has been minimized.

01binary commented Jan 16, 2018

Can someone from Amazon add a link to an issue where aws-lambda-dotnet is updated to support ASP.NET Core 2.0? I see that it's using project.json and old versions of Core packages currently.

@rui-ktei

This comment has been minimized.

rui-ktei commented Jan 16, 2018

Beautiful work guys!

@normj

This comment has been minimized.

Member

normj commented Jan 17, 2018

@01binary Hot off the presses I just pushed a blog post talking about the ASP.NET Core support in Lambda. Hope that helps. https://aws.amazon.com/blogs/developer/serverless-asp-net-core-2-0-applications/

@onema

This comment has been minimized.

onema commented Jan 17, 2018

@dls314 I fixed this issue by adding the following entry in my csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <===
  </PropertyGroup>
</Project>
@dguisinger

This comment has been minimized.

dguisinger commented Jan 17, 2018

Works great, thank you so much!

@strofimo

This comment has been minimized.

strofimo commented Jan 17, 2018

I experience issue with moving to 2.0. Once I updated all to 2.0 (including Program.cs) I see the following error when I call lambda:

Unable to load type 'WebApi.Test.LambdaFunction' from assembly 'WebApi.Test, Culture=neutral, PublicKeyToken=null'.: LambdaException

The lambda function code still the same as for 1.1:

public class LambdaFunction : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
    {
        protected override void Init(IWebHostBuilder builder)
        {
            builder
                .UseContentRoot(Directory.GetCurrentDirectory())
                .UseStartup<Startup>()
                .UseApiGateway();
        }
    }

And the Program.cs is default for 2.0:

    public class Program
    {
        public static void Main(string[] args)
        {
            BuildWebHost(args).Run();
        }

        public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>()
                .Build();
    }

Any ideas whats wrong?

Edit: following instructions from https://aws.amazon.com/blogs/developer/serverless-asp-net-core-2-0-applications/ all works fine now. Tnx!
thanks

@bdkoepke

This comment has been minimized.

bdkoepke commented Jan 17, 2018

@hounddog22030

This comment has been minimized.

hounddog22030 commented Jan 18, 2018

Off topic, but probably the correct audience:

Does AWS CodeBuild support .netstandard and what version? It would seem as though if CodeBuild support .net Core 2.0, it should support the functional equivalent version of .net standard, which according to the way I read this, should be .net standard 2.0 (https://docs.microsoft.com/en-us/dotnet/standard/net-standard).

I have found that it will build .netstandard 1.3 only.

I am trying to use EF Core 2.0, which requires .netstandard 2.0.

@normj

This comment has been minimized.

Member

normj commented Jan 18, 2018

@hounddog22030 CodeBuild supports .NET Core 2.0 which is an implementation of .NET Standard 2.0. You should have no problems building with EF Core 2.0. What areas are you seeing?

Also, I agree this is a good audience but can we move this discussion to the gitter channel? https://gitter.im/aws/aws-lambda-dotnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge

Discussions on closed issues will end up getting lost and will definitely fall off my radar of attention.

@normj

This comment has been minimized.

Member

normj commented Feb 5, 2018

@alexzaytsev-newsroomly .NET Core 2.0 X-Ray support is out https://github.com/aws/aws-xray-sdk-dotnet There is are new version of the VS Toolkit and Lambda CLI tools to allow you to enable X-Ray in Lambda as well.

@YashChatterjee

This comment has been minimized.

YashChatterjee commented Feb 22, 2018

We are experiencing a big issue with AWS Lambda with .Net Core 2.0. I have tried searching and reading a lot of articles, but no resolution yet. The issue is if the Lambda Init() fails with some exception once, then the subsequent requests to this Lambda keep failing. And point to note is that Init() doesn't get called with the subsequent requests and we keep getting Http 504. Only a fresh deployment of the Lambda function fixes the issue. Unfortunately, we can't afford a fresh deployment of the same Lambda function(no code/config change) just to get around this Init() issue. Do we have a fix for this? Would appreciate some help!!

@normj

This comment has been minimized.

Member

normj commented Feb 22, 2018

@YashChatterjee Can you open a separate GitHub issue for this. Adding comments to already closed issues are likely to get lost and forgotten.

@YashChatterjee

This comment has been minimized.

YashChatterjee commented Feb 22, 2018

Thanks @normj Opened another issue: #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment