Introduction

ASP.NET Core is an open-source and cross-platform framework to develop Web Applications and mobile back-end. ASP.NET Core, being a cross-platform framework, provides flexibility to develop and run applications on Windows, Linux, and Mac.
There are multiple ways to deploy an application on AWS EC2 Linux instance. I will post about the AWS code pipeline, which can be used to automate the deployment process and install an Application on EC2 instance, some other day. Now, we will focus on deploying ASP.NET Core Web Application on Amazon Linux instance.
Step 1
Build ASP.NET Core Application
Develop your own ASP.NET Core Application from scratch. Alternatively, you can also use a sample Application on my GitHub for this demo.
Step 2
Provision EC2 instance, using Amazon Linux AMI
Provision a t2.micro instance, using Amazon Linux AMI, as it is eligible for free-tier usage for 12 months.
Logon to AWS console and launch Amazon Linux EC 2 Instance
Step 3
Configure PuTTY to SSH in Linux EC2 instance from Windows
Step 4
Install GIT, Apache and .NET Core on Linux EC2 instance
Refer to https://www.microsoft.com/net/core#linuxcentos steps described for installing .NET Core on CentOS 7.1 also works for Amazon Linux instance.
Step 5
Configure Reverse Proxy so that All Incoming Requests are Passed to kestrel Server
Step 6
Compile and launch .NET Core Application on Linux EC2 instance
Execute the command given below to compile and launch the Application.
  1. dotnet restore dotnet run
Browse deployed Application through public DNS name displayed on the EC2 dashboard. Sample Application displays OS, Frame, and Environment variables set on EC2 instance.