I've been reading up on Amazon Lambda and experimenting on creating web APIs to be used. My understanding is that with the creation of each function, we can create a resource to point to the function and each function would be independent of any other functions. Should we want to use shared libraries, we can do that in the function itself or have the API gateway call an intermediary function which then proxies off the proper request to a final function to create a response.
With the addition of a web API solution that can be hosted on AWS Lambda, why would we ever want to host a complete web app on lambda when an EC2 instance would give more control if we are just going to deploy the whole application?