AWS EC2 is a service that allows for using virtual machines called EC2 instances in the cloud and providing scalability. You can change the amount of disk space, CPU performance, memory etc. whenever you need. You can select the base image with the necessary pre-installed operating system.
The most common use cases of AWS EC2 are:
1) Hosting web sites
2) Developing and testing applications or complex environments
3) High performance computing
4) Disaster recovery
————————————————————————————
AWS Lambda is a computing platform that allows you to run a piece of code written on one of the supported programming languages – Java, JavaScript, or Python when a trigger linked to an event is fired. You don’t need to configure a virtual server and environment to run an application you have written.
General use cases of AWS Lambda:
1) Automating tasks
2) Processing objects uploaded to Amazon S3
3) Real-time log analyzing
4) Real-time filtering and transforming data