Which AWS service runs code in response to events without any server provisioning or management, and charges only for the execution time and number of requests consumed?

1 / 1
Select an answer
CorrectC

Explanation

A question asking to identify the serverless service that runs code in response to events.

  • 1without any server provisioning or managementServerless = Lambda
  • 2runs code in response to eventsEvent-driven execution model
  • 3charges only for the execution time and number of requestsPay-as-you-go with no idle charge
AIncorrect

Amazon EC2

This is incorrect. Amazon EC2 is a service that provides virtual servers, requiring instance selection, launch, and operating system management.

This does not meet the requirement of running code without any server management.

BIncorrect

AWS Fargate

This is incorrect. AWS Fargate is a serverless compute engine that runs containers without server management.

However, charges are based on the vCPU and memory allocated to the container for the duration it runs, not per request. The description in this question — running code per event and charging per execution time and request count — applies to AWS Lambda.

CCorrect

AWS Lambda

This is correct. AWS Lambda is a serverless compute service. No server provisioning or management is required; code runs in response to events such as API calls and file uploads. Charges are based on execution time and request count, with no charge during idle time.

DIncorrect

AWS Elastic Beanstalk

This is incorrect. AWS Elastic Beanstalk is a service that automatically provisions the execution environment, such as Amazon EC2, when code is uploaded.

However, the underlying infrastructure is always-on EC2, which is billed for its running time. The requirement of running only during events and charging per request applies to AWS Lambda, not Elastic Beanstalk.

Key Takeaway

'No server management,' 'event-driven,' and 'pay only for execution' all point to AWS Lambda (serverless). Servers are managed with Amazon EC2; serverless container execution uses AWS Fargate.