Serverless Practice Test 2026–2027 |
Serverless Computing Questions,
Answers & Detailed Rationales
1. A company wants to run application code without provisioning or managing
servers. The application should automatically scale based on incoming
requests. Which AWS service is best suited for this requirement?
A. Amazon EC2
B. Amazon ECS
C. AWS Lambda
D. Amazon Lightsail
Answer: AWS Lambda
Rationale: AWS Lambda is a serverless, event-driven compute service that runs
code without requiring customers to provision or manage servers. Lambda
automatically scales the execution environment based on incoming events or
requests.
, 2. Which characteristic best describes the AWS Lambda pricing model?
A. Customers pay for reserved virtual machines
B. Customers pay based primarily on requests and compute duration
C. Customers pay a fixed monthly server fee
D. Customers pay based only on storage capacity
Answer: Customers pay based primarily on requests and compute duration
Rationale: Lambda pricing is based on factors such as the number of requests
and the duration of function execution, with additional charges possible for
features such as provisioned concurrency and certain networking configurations.
3. A developer wants Lambda to execute automatically whenever a new
object is uploaded to an Amazon S3 bucket. Which capability should be
used?
A. Lambda event notification
B. Amazon EC2 Auto Scaling
C. Amazon CloudFront invalidation
D. AWS Config rule
Answer: Lambda event notification
Rationale: Amazon S3 can generate event notifications when objects are created
or modified and invoke a Lambda function in response.
4. Which AWS service is commonly used to provide an HTTP API endpoint that
invokes Lambda functions?
A. Amazon Route 53
B. Amazon API Gateway
C. Amazon EBS
D. AWS Direct Connect
,Answer: Amazon API Gateway
Rationale: Amazon API Gateway can expose Lambda functions through HTTP or
RESTful APIs, providing capabilities such as authorization, throttling,
monitoring, and request handling.
5. A Lambda function needs permission to read objects from an S3 bucket.
Where should the permissions primarily be configured?
A. Lambda environment variables
B. Lambda execution role
C. S3 object metadata
D. Lambda function URL
Answer: Lambda execution role
Rationale: Lambda assumes an IAM execution role when running. Permissions
granted to this role determine which AWS resources the function can access.
6. What is the primary purpose of a Lambda execution role?
A. To determine the Lambda function's memory allocation
B. To define permissions for AWS resources accessed by the function
C. To configure the Lambda function's source code
D. To determine the API Gateway URL
Answer: To define permissions for AWS resources accessed by the function
Rationale: An execution role is an IAM role that Lambda assumes during
execution. Its policies determine what AWS API operations the function can
perform.
, 7. A Lambda function processes an event and then terminates. Which
statement best describes the server management responsibility?
A. The customer must patch the operating system
B. The customer must manually provision EC2 instances
C. AWS manages the underlying infrastructure
D. The customer must install hypervisors
Answer: AWS manages the underlying infrastructure
Rationale: Lambda is serverless. AWS manages the underlying compute
infrastructure, operating systems, capacity provisioning, and much of the
infrastructure maintenance.
8. A Lambda function is invoked 100,000 times. Each invocation runs for a
different amount of time. Which pricing factor is most directly associated
with the compute portion of the bill?
A. Number of Availability Zones
B. Function execution duration
C. Number of IAM users
D. Number of S3 buckets
Answer: Function execution duration
Rationale: Lambda compute charges are influenced by the amount of execution
time and the configured memory allocation. Request charges may also apply.
9. Which programming approach is most appropriate for AWS Lambda?
A. Long-running stateful server process
B. Short-lived event-driven function
C. Dedicated database server
D. Permanent operating system service