Good news! we have .NET Core 2.0 Lambdas

As a .NET developer writing microservices and Lambda functions in AWS I found it increasingly frustrating that I could not upgrade my code to .NET Core 2.0. All because of the lack of support on Amazon side. In the past I had libraries which needed to be used by both my services and the Lambdas which until recently could only be written using .NET Core 1.0.

But as 2018 begun the good people of Amazon had good news for all of us (read: .NET developers) when less than two weeks ago AWS Lambda .NET Core 2.0 support was announced.

In order to use the new support all you have to do is install (or update) the AWS Toolkit for Visual Studio – assuming you have Visual Studio 2017 already installed (any flavor will do).

Once you have the new Toolkit create a new project and you’re good to go

NewProject

One thing to keep in mind is that all of these templates will create .NET Core 2.0 Lambdas, if you have old code you might need to adjust your project later to use .NET Core 1.0 – or better yet update your old(er) code instead. Regardless of the .NET framework you set you will always end up with .NET Core 2.0 – I’ve tried changing the framework to 4.5 but it got the exact same project.

Another piece of good news is that there are more blueprints to choose from, it helps you get started – fast using the AWS services we all know and love

blueprints.JPG

Hopefully there are more to come as more .NET developers use Lambdas.

Browsing through the project we can now see that the project targets the latest and greatest .NET Core

ProjectProperties.PNG

And that the Lambda runtime has a new value to match

ProjectDefaults.PNG

It was always a pain having several versions of .NET Core in the same project and on top of that it pained me being unable to use 3rd party assemblies all of which seem to target .NET Core 2.0 these days. I don’t know about you but I can’t wait to update my old Lambdas code and start using more Lambdas sharing code base with the rest of the project.

Until then – Happy coding…

One thought on “Good news! we have .NET Core 2.0 Lambdas

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.