How do I convert an MVC 4 project to an AWS Lambda function?

I wrote a small frontend in MVC4 - Razor Engine (Visual Studio 2015). This works great when hosted on IIS. It is a small utility where the user loads an image and in the background, I make calls to several services using the appropriate payload.

What I don't understand is how I can host this as an AWS Lambda function. Create a new AWMS Lambda project and rewrite your code? Or I just have to "Publish to AWS Elastic Beanstalk". Are lambda functions (AWS) and applications hosted on AWS Elastic Beanstalk serverless?

My ultimate goal is to host my web application (built in Visual Studio) on AWS without a server. How should I do it. New to the AWS world.

A few videos I've seen include:

https://www.youtube.com/watch?v=6qwG5ufO1ik and https://www.youtube.com/watch?v=Ymn6WGCSjE4

Thanks in advance.

EDIT: I see that we can just return the html page in response from AWMS lambda Function Handler. Can we also return javascript?

+4


source to share


2 answers


You cannot move a UI related application to Lambda, Lambda has nothing to do with the UI.



If you wanted your application to be "serverless" you could move your visuals to a static HTML page and host it in S3, and then you could rewrite any of the Lambda functionality, but just move the UI oriented application MVC for Lambda is not possible.

+2


source


Convert your MVC4 app to .NET Core and have it!



https://aws.amazon.com/blogs/developer/serverless-asp-net-core-2-0-applications/

0


source







All Articles