Which AWS service is closest to a rented virtual server, and which runs code without managing servers?
Options
- EC2 is the virtual server; Lambda runs code without managing servers (Correct option)
- Lambda is the virtual server; EC2 runs code without managing servers
- S3 is the virtual server; RDS runs code without managing servers
- IAM is the virtual server; VPC runs code without managing servers
Answer
EC2 is the virtual server; Lambda runs functions without servers
Why
EC2 (Elastic Compute Cloud): virtual machines you choose, configure and patch.
Lambda: serverless functions; you upload code, AWS runs it on events and bills per execution.
In between: ECS/EKS (containers), Fargate (containers without managing servers), Elastic Beanstalk (PaaS).
The more managed, the less control but less operations work.
Remember
EC2 = virtual machine. Lambda = serverless function.