1What is the primary characteristic of a 'Serverless' architecture regarding infrastructure management?
A.Servers are managed by a third-party consultant
B.There are no physical servers involved at all
C.Infrastructure management is offloaded to the cloud provider
D.Developers must manually patch the operating system
Correct Answer: Infrastructure management is offloaded to the cloud provider
Explanation:
In serverless computing, the cloud provider handles the routine work of provisioning, maintaining, and scaling the server infrastructure, allowing developers to focus on code.
Incorrect! Try again.
2Which of the following is a key benefit of the AWS Lambda pricing model?
A.You pay based on the size of the uploaded code zip file only
B.You pay a flat monthly fee regardless of usage
C.You pay only for the compute time consumed
D.You pay for the idle time when code is not running
Correct Answer: You pay only for the compute time consumed
Explanation:
AWS Lambda charges based on the number of requests and the duration the code executes (to the nearest millisecond), meaning there is no charge when the code is not running.
Incorrect! Try again.
3In the context of AWS Lambda, what is a 'Cold Start'?
A.The process of rebooting the entire AWS region
B.Starting a function using the AWS CLI
C.The latency experienced when a function is invoked after being idle
D.The time it takes to upload code to AWS
Correct Answer: The latency experienced when a function is invoked after being idle
Explanation:
A cold start occurs when AWS Lambda must initialize a new execution environment (container) to handle a request because no warm environments are available.
Incorrect! Try again.
4Which AWS service allows you to create, publish, maintain, monitor, and secure APIs at any scale?
A.Amazon API Gateway
B.AWS Lambda
C.Amazon SNS
D.AWS Step Functions
Correct Answer: Amazon API Gateway
Explanation:
Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale.
Incorrect! Try again.
5What is the maximum execution timeout limit for a single AWS Lambda function invocation?
A.15 minutes
B.1 hour
C.24 hours
D.5 minutes
Correct Answer: 15 minutes
Explanation:
The maximum hard limit for an AWS Lambda function execution is 900 seconds (15 minutes).
Incorrect! Try again.
6When configuring AWS Lambda, how is CPU power allocated?
A.It is fixed for all functions regardless of configuration
B.It is allocated proportionally to the amount of memory configured
C.You select the number of vCPUs directly
D.It is determined by the size of the code package
Correct Answer: It is allocated proportionally to the amount of memory configured
Explanation:
In AWS Lambda, you cannot select CPU independently. AWS allocates CPU power linearly in proportion to the amount of memory you configure.
Incorrect! Try again.
7Which AWS service is a serverless compute engine for containers that works with both Amazon ECS and Amazon EKS?
A.Amazon Lightsail
B.Amazon EC2
C.AWS Fargate
D.AWS Beanstalk
Correct Answer: AWS Fargate
Explanation:
AWS Fargate is a serverless compute engine for containers that removes the need to provision and manage servers, working with both ECS and EKS.
Incorrect! Try again.
8In a microservices architecture, what is the primary role of Amazon ECS?
A.To orchestrate and manage Docker containers
B.To store Docker images
C.To run Lambda functions
D.To act as an API Gateway
Correct Answer: To orchestrate and manage Docker containers
Explanation:
Amazon Elastic Container Service (ECS) is a fully managed container orchestration service that helps you deploy, manage, and scale containerized applications.
Incorrect! Try again.
9Which principle of the Well-Architected Framework is addressed by using AWS X-Ray in a serverless application?
A.Sustainability
B.Reliability
C.Operational Excellence
D.Cost Optimization
Correct Answer: Operational Excellence
Explanation:
AWS X-Ray helps developers analyze and debug production, distributed applications (monitoring and observability), which is a key component of Operational Excellence.
Incorrect! Try again.
10What is the purpose of an 'Execution Role' in AWS Lambda?
A.To define which users can delete the function
B.To allow users to login to the Lambda console
C.To encrypt the function code
D.To grant the Lambda function permissions to access other AWS services
Correct Answer: To grant the Lambda function permissions to access other AWS services
Explanation:
An IAM Execution Role defines the permissions that the Lambda function itself has to interact with other AWS services like S3, DynamoDB, or CloudWatch.
Incorrect! Try again.
11Which feature of Amazon API Gateway allows you to route requests to different versions of your API (e.g., prod, dev)?
A.Resources
B.Models
C.Stages
D.Methods
Correct Answer: Stages
Explanation:
API Gateway uses Stages to manage different lifecycles of an API, such as development, test, and production environments.
Incorrect! Try again.
12How should a stateless serverless function handle persistent data?
A.Store it in the function's local file system (/tmp) permanently
B.Store it in an external stateful service like Amazon DynamoDB or S3
C.Keep it in a global variable within the code
D.Data cannot be persisted in serverless architectures
Correct Answer: Store it in an external stateful service like Amazon DynamoDB or S3
Explanation:
Since Lambda functions are stateless and ephemeral, any data that needs to persist across invocations must be stored in an external service like database or object storage.
Incorrect! Try again.
13What is 'Lambda Proxy Integration' in API Gateway?
A.A method to use EC2 instances as proxies
B.A setup where the raw request is passed directly to Lambda and the function handles the response format
C.A security feature to hide the Lambda ARN
D.A way to cache API responses
Correct Answer: A setup where the raw request is passed directly to Lambda and the function handles the response format
Explanation:
Proxy integration allows the API Gateway to pass the entire client request to the Lambda function and allows the function to determine the HTTP response headers and body.
Incorrect! Try again.
14Which AWS container service is best suited for users who want to use Kubernetes without managing the control plane?
A.Amazon ECR
B.AWS Lambda
C.Amazon EKS
D.Amazon ECS
Correct Answer: Amazon EKS
Explanation:
Amazon Elastic Kubernetes Service (EKS) provides a managed Kubernetes control plane, allowing users to run Kubernetes without installing or maintaining the control plane software.
Incorrect! Try again.
15To optimize costs in a high-traffic serverless API, what feature of API Gateway should be enabled to reduce the number of calls to the backend Lambda?
A.Throttling
B.Usage Plans
C.CORS
D.API Caching
Correct Answer: API Caching
Explanation:
Enabling API Caching allows API Gateway to store responses for a specified TTL, reducing the number of calls made to the backend endpoint and lowering costs/latency.
Incorrect! Try again.
16What is a 'Layer' in AWS Lambda?
A.A backup of the function code
B.A versioning tool for API Gateway
C.A mechanism to pull in additional code or libraries separately from the main deployment package
D.A security group setting
Correct Answer: A mechanism to pull in additional code or libraries separately from the main deployment package
Explanation:
Lambda Layers allow you to package libraries, custom runtimes, or other dependencies separately, reducing the size of the main deployment archive and promoting code reuse.
Incorrect! Try again.
17Which Well-Architected principle suggests using 'asynchronous' design patterns (like SQS) to decouple serverless components?
A.Sustainability
B.Cost Optimization
C.Reliability
D.Security
Correct Answer: Reliability
Explanation:
Decoupling components using asynchronous patterns (queues/topics) prevents failures in one component from cascading to others, thereby increasing the Reliability of the system.
Incorrect! Try again.
18What happens if an asynchronous Lambda invocation fails?
A.It is discarded immediately
B.It returns a 500 error to the user immediately
C.The entire AWS region shuts down
D.AWS Lambda automatically retries the invocation twice
Correct Answer: AWS Lambda automatically retries the invocation twice
Explanation:
For asynchronous invocations, Lambda places the event in a queue and automatically retries the function twice (for a total of 3 attempts) if it fails.
Incorrect! Try again.
19What is the purpose of Amazon ECR (Elastic Container Registry)?
A.To store, manage, and deploy Docker container images
B.To run containers
C.To monitor container logs
D.To load balance container traffic
Correct Answer: To store, manage, and deploy Docker container images
Explanation:
Amazon ECR is a fully managed Docker container registry that makes it easy to store, manage, and deploy container images.
Incorrect! Try again.
20Which architectural pattern is commonly used in serverless to handle complex workflows involving multiple Lambda functions?
A.Manual triggering
B.Hard-coding calls inside functions
C.Orchestration using AWS Step Functions
D.Monolithic architecture
Correct Answer: Orchestration using AWS Step Functions
Explanation:
AWS Step Functions provides serverless orchestration for modern applications, allowing you to coordinate multiple Lambda functions into flexible workflows (state machines).
Incorrect! Try again.
21Regarding Security in Serverless (Well-Architected), what is the 'Principle of Least Privilege'?
A.Granting only the permissions necessary to perform a task
B.Using only public subnets
C.Giving all functions Admin access to ensure they work
D.Removing all permissions from functions
Correct Answer: Granting only the permissions necessary to perform a task
Explanation:
The Principle of Least Privilege dictates that a Lambda function should only have the IAM permissions strictly required to do its job, minimizing the blast radius if compromised.
Incorrect! Try again.
22Which mechanism can be used to authorize API Gateway requests using a Lambda function?
A.NACLs
B.IAM Policy
C.Security Groups
D.Lambda Authorizer
Correct Answer: Lambda Authorizer
Explanation:
A Lambda Authorizer (formerly known as a custom authorizer) is a Lambda function that you provide to control access to your API API Gateway.
Incorrect! Try again.
23How can you mitigate the issue of 'noisy neighbors' when running microservices on AWS Lambda?
A.Use a larger EC2 instance
B.Use Provisioned IOPS
C.Use a Load Balancer
D.Use Reserved Concurrency
Correct Answer: Use Reserved Concurrency
Explanation:
Reserved Concurrency guarantees a specific number of concurrent executions for a function, ensuring that other functions consuming the account's concurrency limit do not starve it.
Incorrect! Try again.
24What is the 'Launch Type' in Amazon ECS where you manage the underlying EC2 instances?
A.Serverless Launch Type
B.Hybrid Launch Type
C.EC2 Launch Type
D.Fargate Launch Type
Correct Answer: EC2 Launch Type
Explanation:
With the EC2 Launch Type in ECS, you are responsible for provisioning, patching, and scaling the cluster of EC2 instances that host your containers.
Incorrect! Try again.
25Which environment variable helps handle database connection reuse in AWS Lambda to improve performance?
In Node.js runtimes, setting context.callbackWaitsForEmptyEventLoop = false allows the function to return a response immediately without waiting for the database connection (event loop) to close, allowing connection reuse in subsequent invocations.
Incorrect! Try again.
26Ideally, how should a serverless function be designed regarding 'idempotency'?
A.It should produce different results every time
B.It doesn't matter
C.It should produce the same result if executed multiple times with the same input
D.It should only be executable once per day
Correct Answer: It should produce the same result if executed multiple times with the same input
Explanation:
Idempotency ensures that if a function is retried (due to network issues or failures), it does not corrupt data or duplicate transactions.
Incorrect! Try again.
27Which tool allows you to define serverless applications using a simplified syntax which is then transformed into CloudFormation?
A.AWS SAM (Serverless Application Model)
B.AWS EC2 Console
C.Amazon RDS
D.AWS OpsWorks
Correct Answer: AWS SAM (Serverless Application Model)
Explanation:
AWS SAM is an open-source framework that provides a shorthand syntax to express functions, APIs, databases, and event source mappings, which expands into standard CloudFormation.
Incorrect! Try again.
28What is the maximum amount of ephemeral storage (/tmp) available to a Lambda function (as of recent updates)?
A.Up to 10 GB
B.512 MB only
C.Up to 100 GB
D.Unlimited
Correct Answer: Up to 10 GB
Explanation:
AWS Lambda allows you to configure ephemeral storage (/tmp) between 512 MB and 10,240 MB (10 GB).
Incorrect! Try again.
29In a serverless architecture, where do application logs typically go by default?
A.Amazon CloudWatch Logs
B.Amazon S3
C.They are deleted immediately
D.A local text file
Correct Answer: Amazon CloudWatch Logs
Explanation:
By default, AWS Lambda automatically integrates with CloudWatch Logs, creating a log group for each function and streaming stdout/stderr there.
Incorrect! Try again.
30Which API Gateway endpoint type is best suited for clients located geographically close to a specific AWS region?
A.Regional
B.Private
C.Edge-Optimized
D.Global
Correct Answer: Regional
Explanation:
Regional endpoints are intended for clients in the same region. Edge-optimized endpoints use CloudFront to serve globally distributed clients.
Incorrect! Try again.
31To enable private communication between an API Gateway and a backend service in a VPC without exposing it to the internet, what should be used?
A.Direct Connect
B.VPC Link
C.NAT Gateway
D.Internet Gateway
Correct Answer: VPC Link
Explanation:
VPC Link allows API Gateway to access resources within a VPC (like an Application Load Balancer) securely without traversing the public internet.
Incorrect! Try again.
32What is 'Provisioned Concurrency' in AWS Lambda designed to solve?
A.Memory leaks
B.Cold start latency
C.High storage costs
D.Security vulnerabilities
Correct Answer: Cold start latency
Explanation:
Provisioned Concurrency initializes a requested number of execution environments so that they are ready to respond immediately to your function's invocations, eliminating cold starts.
Incorrect! Try again.
33Which service acts as a 'Service Mesh' to standardize how microservices communicate on AWS (ECS/EKS)?
A.AWS Glue
B.Amazon Connect
C.Amazon MQ
D.AWS App Mesh
Correct Answer: AWS App Mesh
Explanation:
AWS App Mesh provides application-level networking (service mesh) to make it easy for your services to communicate with each other across multiple types of compute infrastructure.
Incorrect! Try again.
34When building a serverless web application, which service is commonly used to host static assets (HTML/CSS/JS)?
A.Amazon DynamoDB
B.Amazon S3
C.Amazon API Gateway
D.AWS Lambda
Correct Answer: Amazon S3
Explanation:
Amazon S3 is the standard solution for hosting static website content in a serverless architecture, often served via CloudFront.
Incorrect! Try again.
35What is the primary constraint of the 'Lambda' processing model regarding processing time?
A.It pauses during high traffic
B.It must run continuously
C.It is designed for long-running batch jobs (hours)
D.It is designed for short-lived, event-driven tasks
Correct Answer: It is designed for short-lived, event-driven tasks
Explanation:
Lambda is designed for short-lived tasks (max 15 mins). For longer processes, container services like ECS or AWS Batch are more appropriate.
Incorrect! Try again.
36How does AWS Fargate differ from the EC2 launch type in terms of pricing?
A.Fargate charges per instance per hour
B.Fargate charges based on vCPU and memory resources consumed per second
C.Fargate charges based on the number of users
D.Fargate is free
Correct Answer: Fargate charges based on vCPU and memory resources consumed per second
Explanation:
With Fargate, you pay for the amount of vCPU and memory resources that your containerized application requests, calculated per second.
Incorrect! Try again.
37Which Well-Architected principle implies using Managed Services (like DynamoDB or SQS) over self-managed servers to reduce environmental impact?
A.Operational Excellence
B.Performance Efficiency
C.Security
D.Sustainability
Correct Answer: Sustainability
Explanation:
Using managed services improves sustainability because AWS optimizes the utilization of the shared infrastructure, reducing the overall carbon footprint compared to underutilized self-managed servers.
Incorrect! Try again.
38In API Gateway, what is 'Throttling'?
A.Encrypting the data
B.Blocking all traffic
C.Increasing the speed of the API
D.Limiting the number of requests a user can make per second
Correct Answer: Limiting the number of requests a user can make per second
Explanation:
Throttling prevents your API from being overwhelmed by too many requests, protecting backend systems from spikes in traffic.
Incorrect! Try again.
39What is a 'Dead Letter Queue' (DLQ) used for in Lambda?
A.Queueing requests when the system is cold
B.Storing events that failed to process after all retry attempts
C.Storing successfully processed events
D.Sending emails to developers
Correct Answer: Storing events that failed to process after all retry attempts
Explanation:
A DLQ captures asynchronous events that fail processing after retries, allowing developers to analyze and debug the failure later.
Incorrect! Try again.
40Which AWS service is used for service discovery in ECS to allow containers to find each other by name?
A.Amazon CloudFront
B.AWS Config
C.Amazon Route 53 (Public)
D.AWS Cloud Map
Correct Answer: AWS Cloud Map
Explanation:
AWS Cloud Map allows you to register any application resources, such as microservices, and define custom names for them, which ECS uses for service discovery.
Incorrect! Try again.
41When defining a Lambda function in CloudFormation, where is the code usually located?
A.In Amazon RDS
B.Hardcoded in the template (for very small functions) or in an S3 bucket
C.On a physical USB drive
D.In an EC2 instance
Correct Answer: Hardcoded in the template (for very small functions) or in an S3 bucket
Explanation:
Lambda code in CloudFormation is either inline (ZipFile property) for simple code or referenced via an S3 Bucket and Key.
Incorrect! Try again.
42Which architectural pattern involves replacing a monolithic application incrementally with microservices?
A.Adapter Pattern
B.Factory Pattern
C.Singleton Pattern
D.Strangler Fig Pattern
Correct Answer: Strangler Fig Pattern
Explanation:
The Strangler Fig pattern involves gradually creating a new system around the edges of the old, letting it grow and slowly replace the old system until the old system can be strangled (decommissioned).
Incorrect! Try again.
43What is the function of the 'Task Definition' in Amazon ECS?
A.It acts as a load balancer
B.It monitors the cost of the cluster
C.It is a blueprint that describes how a docker container should launch
D.It installs the Docker engine
Correct Answer: It is a blueprint that describes how a docker container should launch
Explanation:
A Task Definition is a text file (JSON) that describes one or more containers (up to 10) that form your application, including image URI, memory, and CPU requirements.
Incorrect! Try again.
44How can you secure environment variables in AWS Lambda that contain sensitive information?
A.Write them in plain text in the console
B.Save them in the description field
C.Store them in the function code comments
D.Use AWS KMS (Key Management Service) to encrypt them
Correct Answer: Use AWS KMS (Key Management Service) to encrypt them
Explanation:
AWS Lambda allows you to use helpers to encrypt environment variables using AWS KMS, ensuring secrets are not visible in plain text in the console.
Incorrect! Try again.
45Which integration type in API Gateway is necessary if you need to transform the client request body before sending it to the backend?
A.Mock Integration
B.Lambda Proxy Integration
C.AWS Integration (Non-Proxy)
D.HTTP Proxy
Correct Answer: AWS Integration (Non-Proxy)
Explanation:
In non-proxy (custom) integration, you can use mapping templates (VTL) to transform the request payload into a format required by the backend, and transform the response back.
Incorrect! Try again.
46For a memory-intensive image processing microservice, which configuration change in Lambda will most likely improve execution speed?
A.Using Python instead of Node.js
B.Reducing the code size
C.Increasing the Memory allocation
D.Increasing the Timeout
Correct Answer: Increasing the Memory allocation
Explanation:
Since CPU is allocated proportionally to memory, increasing memory allocation provides more CPU power, which significantly speeds up computational tasks like image processing.
Incorrect! Try again.
47What is 'Event Source Mapping' in AWS Lambda?
A.A diagram of the architecture
B.A map of where AWS data centers are located
C.A way to map IP addresses
D.A configuration that polls a stream or queue (like Kinesis or SQS) and invokes the function
Correct Answer: A configuration that polls a stream or queue (like Kinesis or SQS) and invokes the function
Explanation:
Event Source Mapping is used for services that don't invoke Lambda directly (poll-based services). The Lambda service reads items from the source (e.g., Kinesis, DynamoDB Streams, SQS) and invokes the function.
Incorrect! Try again.
48When running microservices on EKS, what is a 'Pod'?
A.A networking rule
B.A storage volume
C.The smallest deployable unit of computing in Kubernetes
D.A specific type of EC2 instance
Correct Answer: The smallest deployable unit of computing in Kubernetes
Explanation:
In Kubernetes (and EKS), a Pod is the smallest execution unit, representing a single instance of a running process in your cluster, usually containing one or more containers.
Incorrect! Try again.
49Which HTTP method is typically used in API Gateway to handle CORS preflight requests?
A.DELETE
B.POST
C.OPTIONS
D.GET
Correct Answer: OPTIONS
Explanation:
Browsers send an HTTP OPTIONS request to the server (Preflight) to check which HTTP methods and headers are allowed before sending the actual request, facilitating CORS.
Incorrect! Try again.
50What is the primary benefit of using 'Aliases' in AWS Lambda?
A.They increase the memory limit
B.They automatically debug the code
C.They allow you to rename the function
D.They point to specific versions of a function, allowing for traffic shifting and rollback
Correct Answer: They point to specific versions of a function, allowing for traffic shifting and rollback
Explanation:
Aliases are pointers to specific versions. They enable safe deployments by allowing you to point 'PROD' to a stable version and shift traffic gradually to a new version.