These questions are independently created for study purposes. They are not official AWS exam questions, actual exam questions, leaked questions, or exam dumps.
CLF-035
Which AWS service is a representative choice for running code only when an event occurs, without continuously managing servers?
Choices
Explanation and answer
Read the explanation and correct answer (spoiler — try answering first)
Correct answer: D. AWS Lambda
Explanation
AWS Lambda is a serverless compute service that runs code in response to requests or events. You do not need to provision or continuously manage servers.
Per-choice explanations
A. Amazon EFS
Incorrect. EFS is a file storage service.
B. Amazon EC2
Incorrect. EC2 is a virtual server and requires OS and instance management.
C. Amazon Route 53
Incorrect. Route 53 is a DNS service, not a code execution service.
D. AWS Lambda
Correct. Lambda is a serverless service that runs code in response to events.
Practical Use
AWS Lambda is a serverless compute service that runs code without requiring server management. You register code as a Lambda function and it runs automatically in response to various events, such as requests through API Gateway, object creation in Amazon S3, Amazon DynamoDB Streams, scheduled events from Amazon EventBridge, and messages from Amazon SQS. You are charged only for the execution time in milliseconds and the number of requests, and there is no cost while the function is idle. On the exam, the typical question asks which event-driven compute service runs code without server management. Distractors include EC2 (virtual servers), EFS (shared file storage), and Route 53 (DNS). EC2 requires server management such as starting and stopping instances and applying patches, so it is not serverless. EFS and Route 53 are not compute services in the first place. In practice, Lambda is widely used for API backends, scheduled batch jobs, image processing triggered by file uploads, log transformation, and Slack notifications and other lightweight processing. Long-running processing (the default limit is 15 minutes), heavy computation, and workloads that require large amounts of memory are not a good fit for Lambda, and you would instead consider Amazon ECS, AWS Fargate, or Amazon EC2. CLF-C02 focuses on what serverless means and the role of Lambda. Keywords such as usage-based billing, low operational overhead, and event-driven execution appear repeatedly.