Compared to AWS Lambda, EC2 runs a full copy of the operating system and all the necessary hardware to run the OS. Managing and provisioning the EC2 environment is therefore required. On the other hand, Lambda only needs a few system resources and dependencies to run a specific function. AWS handles everything else.