4

I have written a small UI in MVC4 - Razor Engine (Visual Studio 2015). This works perfectly fine when hosted on IIS. It is a small utility where user uploads an image and in the background, I make call to a few services using suitable payload.

What I don't understand is that how do I host this as a AWS Lambda function. Do I create a new AWS Lambda Project and rewrite my code? Or should I simply "Publish to AWS Elastic Beanstalk". Are Lambda functions(AWS) and apps hosted on AWS Elastic Beanstalk, serverless?.

My end goal is to host my Web app (created in Visual Studio) on AWS in a serverless manner. How do I go about it. New to the world of AWS.

A few videos that I have 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 simply return html page in response from AWS lambda Function Handler. Can we in the same way, return javascript as well ?

3
  • The AWS toolkit for Visual Studio already contains an AWS Serverless project template that uses Web API and configures API Gateway to forward HTTP requests to the controllers Commented Apr 13, 2017 at 9:38
  • 1
    Check AWS Serverless applications in Visual Studio and Using AWS Lambda with the AWS Toolkit for Visual Studio. Commented Apr 13, 2017 at 9:42
  • @PanagiotisKanavos, I have downloaded AWS toolkit for VS. And I have all options required to public my web app. but is it same as a lambda function ? I have an UI as a part of my project which is important. Can that be deployed using lambda functions ? Commented Apr 13, 2017 at 9:44

2 Answers 2

4

You can't move a UI related application to Lambda, Lambda has nothing to do with the UI.

If you want your application to be 'serverless', you could migrate your visual elements to a static HTML page and host that on S3 and then you could rewrite any of the back-end functionality in Lambda, but simply moving a UI centric MVC app to Lambda is not possible.

Sign up to request clarification or add additional context in comments.

3 Comments

This solves my confusion. So, does it make sense to have the UI hosted on Elastic Beanstalk which internally calls a lambda function. And this lambda function will encapsulate all calls that I need to make with suitable payload? But does this make sense? Should i be hosting everything on Elastic beanstalk instead?
Does AWS have any Severless way to host an MVC app the way AZURE does, or is AWS low functioning compared to Azure in Serverless App hosting?
@DaveAlperovich if you can convert to .net core... it's supported. aws.amazon.com/blogs/developer/…
0

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

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.