AWS Lambda MCQ Questions and Answers: A Comprehensive Guide
Looking to boost your understanding of AWS Lambda? This set of AWS Lambda MCQ questions and answers will help you understand key concepts such as Lambda function configuration, memory, timeout, function handler, event objects, and testing Lambda functions both locally and in the console. Use these questions to prepare for exams or enhance your AWS skills.
a) 1 minute
b) 5 minutes
c) 3 minutes
d) 15 minutes
a) Execution environment
b) Container environment
c) Instance environment
d) Virtual machine environment
a) Megabytes
b) Gigabytes
c) Kilobytes
d) Terabytes
a) It logs an error
b) It restarts automatically
c) It is terminated and fails
d) It continues to execute
a) Python
b) Java
c) C++
d) Node.js
a) By providing the handler name in the Lambda console
b) By using an environment variable
c) By defining it in the AWS CLI only
d) By selecting the runtime environment
a) Passed automatically to the function
b) Only for debugging purposes
c) A manual input from the developer
d) Never used in Lambda functions
a) Lambda versions cannot be published
b) Lambda versions are immutable
c) A version can be modified after publishing
d) Lambda versions are only for testing
a) To create multiple versions of a function
b) To associate a function with different event triggers
c) To provide an easier way to manage Lambda versions
d) To run Lambda functions in multiple regions
a) It creates a new version of the function
b) It updates all the versions of the function
c) It points the alias to a new version
d) It disables the function temporarily
a) Through the Lambda console only
b) By hardcoding the values in the function code
c) Using the Lambda API to retrieve them
d) By using the process.env
in Node.js or os.environ
in Python
a) Aliases
b) Environment variables
c) Memory allocation
d) Execution role
a) The maximum number of retries
b) The memory, timeout, and handler
c) The event types
d) The execution role permissions
a) 1024 MB
b) 4096 MB
c) 512 MB
d) 10240 MB
a) Amazon CloudWatch
b) AWS X-Ray
c) AWS CloudTrail
d) AWS GuardDuty
a) Using AWS CLI only
b) By deploying it in a sandbox environment
c) Using AWS SAM or Docker
d) It cannot be tested locally
a) Lambda automatically restarts the function
b) An error is logged in CloudWatch Logs
c) It stops execution and triggers a failure notification
d) The function is disabled permanently
a) Timeout can be set to a minimum of 1 second
b) Timeout can be set up to 15 minutes
c) Timeout is automatically set based on the function’s memory
d) Timeout defines how long Lambda will wait before terminating a function
a) It needs to be created manually by the user
b) It is automatically passed to the function on each invocation
c) It is fetched from S3 every time
d) It is stored in a database for future use
a) Yes, based on the Lambda configuration
b) No, Lambda functions are global
c) Only in the US region
d) Only in the EU region
a) S3 event
b) EC2 instance
c) DynamoDB
d) All of the above
a) Node.js 10.x
b) Python 3.8
c) Java 8
d) Ruby 2.7
a) os.getenv()
b) os.environ.get()
c) process.env
d) fetch_env()
a) Providing a unique identifier for function versions
b) Allowing you to quickly test functions
c) Versioning and managing Lambda functions more efficiently
d) Restricting access to Lambda functions
a) Yes
b) No
c) Only in the AWS Management Console
d) Only using Lambda API
a) It triggers another Lambda function
b) It returns an HTTP status code 200
c) It outputs logs to CloudWatch
d) It only outputs results to S3
a) To initialize the Lambda function environment
b) To handle the incoming event request and process it
c) To fetch logs from CloudWatch
d) To manage environment variables
a) Memory scaling
b) Event-driven architecture
c) Auto-scaling based on Lambda invocations
d) Function timeout
a) Yes
b) No
c) Only in aliases
d) Only in the AWS Management Console
a) Through AWS CloudWatch Logs
b) Only through Lambda Console
c) By sending logs to an S3 bucket
d) By using Lambda API
Qno | Answer (Option with the text) |
---|---|
1 | b) 5 minutes |
2 | a) Execution environment |
3 | a) Megabytes |
4 | c) It is terminated and fails |
5 | c) C++ |
6 | a) By providing the handler name in the Lambda console |
7 | a) Passed automatically to the function |
8 | b) Lambda versions are immutable |
9 | c) To provide an easier way to manage Lambda versions |
10 | c) It points the alias to a new version |
11 | d) By using the process.env in Node.js or os.environ in Python |
12 | a) Aliases |
13 | b) The memory, timeout, and handler |
14 | b) 4096 MB |
15 | a) Amazon CloudWatch |
16 | c) Using AWS SAM or Docker |
17 | b) An error is logged in CloudWatch Logs |
18 | c) Timeout is automatically set based on the function’s memory |
19 | b) It is automatically passed to the function on each invocation |
20 | a) Yes, based on the Lambda configuration |
21 | d) All of the above |
22 | a) Node.js 10.x |
23 | b) os.environ.get() |
24 | c) Versioning and managing Lambda functions more efficiently |
25 | a) Yes |
26 | c) It outputs logs to CloudWatch |
27 | b) To handle the incoming event request and process it |
28 | c) Auto-scaling based on Lambda invocations |
29 | a) Yes |
30 | a) Through AWS CloudWatch Logs |