What is AWS Lambda ?
AWS Lambda is a computer service. It runs code without managing servers. Mainly it executes your code only when needed pay them and use it.
Where you can easily adaptable:
1. Run code in parallel.
2.Bring your own code even native libraries.
3.Create back-end, event handlers.
Where you don’t have think about AWS Lambda
2.Scaling and fault tolerance
3.Operating System updates.
What is Amazon EC2?
Amazon EC2 => Amazon Elastic Cloud Compute :
EC2 provides flexible computing capacity in Amazon Web Services for faster deployment and easily developing the applications. It uses service to create virtual machines instead of new hardware and balance work load across running virtual machines.
The virtual machines created using AWS EC2 service are commonly known as EC2 instances.
Difference between EC2 Vs Lambda
1. EC2 offers flexibility can choose instances type and option for customized operating system, security and network.
AWS Lambda makes it easy to execute code in response to events
2.Amazon EC2 provides an easy – to – use service for deploying and scaling web applications.
In Lambda Trigger function in response to events without providing instances.
3. EC2 responsible for providing capacity monitoring performance, monitoring and scalability.
Lambda provides easy scaling and high availability to your code.