It can be relatively simple to get started with serverless and this post will show you how.
Serverless computing is the future of the cloud according to Mark Russinovich the head of Microsoft’s Azure cloud platform.
Serverless provides three critical benefits:
- abstracts the servers so you can focus on the code,
- is auto-scalable,
- is event-driven and micro-billed.
This last one deserves some explanation as it is perhaps the most persuasive argument for serverless, the relatively low-cost due to charges accruing only as you use resources.
Serverless provider options
While there are a number of niche serverless providers like Iron.io, there are three mainstream ones of note:
- Google Cloud Functions,
- Amazon Web Services (AWS) Lambda and,
- Microsoft’s Azure logic apps.
I’ll focus this serverless tutorial on AWS since they’ve been around the longest, and because their Linux OS machines are part of the movement toward utility compute and even dot net core’s development.
Getting started with Dot net core on AWS Lambda
Here are the steps to get started with a dot net core web-api project hosted in AWS Lambda.
- First thing you need is to sign up for an account, yes it’s true you’re going to need keys, so go along to https://aws.amazon.com/free/ and sign up for a free account if you don’t already have one. Be aware you’ll need a credit card and that a $1.50 will be charged to it in order to activate your account.
- Add a user with Admin rights. To do this you need to first login to the console, click on the Services link at the top right of the navigation bar, then choose IAM (Identity and Access management). Once there add a new user by following the wizard, and assign them Admin rights by giving them the Admin role from the list of pre-configured authorizations.
- Next add the AWS toolkit to Visual Studio from the link here, once it is installed (you should always install VSIX with VS2017 closed), open VS2017 and you should see the information registration page for AWS toolkit.
- Enter the information for the new user you added in Step Two and your account information. If it all worked as expected then you should be able to expand the node AWS Identity and Access Management, then under the Users node, see your new user listed.