AWS Lambda MCQs

AWS Lambda MCQs

These AWS Lambda multiple-choice questions and their answers will help you strengthen your grip on the subject of AWS Lambda. You can prepare for an upcoming exam or job interview with these 40 AWS Lambda MCQs.
So scroll down and start answering.

1: How can you increase the CPU resources for your Lambda?

A.   Increase the configured CPU value

B.   Increase the configured timeout value

C.   Increase the configured memory value

D.   Increase the configured concurrency value

2: How can you increase the CPU resources for your Lambda?

A.   Increase the configured CPU value

B.   Increase the configured timeout value

C.   Increase the configured memory value

D.   Increase the configured concurrency value

3: How can additional code or content be provided for your Lambda?

A.   Blocks

B.   Layers

C.   Aliases

D.   Handlers

4: How can Step Functions call Lambdas?

A.   In sequence

B.   Both of these answers

C.   Neither of these answers

D.   In parallel

5: Which AWS CLI command invokes a function?

A.   Aws lambda invoke --function ReturnBucketName outputfile.txt

B.   Aws lambda execute --function-name ReturnBucketName outputfile.txt

C.   Aws lambda invoke --function-name ReturnBucketName outputfile.txt

D.   Aws lambda execute --function ReturnBucketName outputfile.txt

6: What adds tracing capabilities to a Lambda?

A.   AWS Trace

B.   CloudStack

C.   CloudTrail

D.   AWS X-Ray

7: You need to build a continuous integration/deployment pipeline for a set of Lambdas. What should you do?

A.   Create configuration files and deploy them using AWS CodePipeline.

B.   Create CloudFormation templates and deploy them using AWS CodeBuild

C.   Create configuration file and deploy using AWS CodeBuild

D.   Create CloudFormation templates and deploy them using AWS CodePipeline.

8: What can you use to monitor function invocations?

A.   API Gateway

B.   S3

C.   SAS

D.   CLoudTrail

9: It is AWS best practice to enable Lambda logging by which of these methods.

A.   Use S3 metrics and CloudWatch alarms

B.   Create custom metrics within your Lambda code.

C.   Create custom metrics within your CloudWatch code.

D.   Use Lambda metrics and CloudWatch alarms.

10: What may be provided for environment variables?

A.   An SSL certificate

B.   A bitmask

C.   An AWS KMS key

D.   An HTTP protocol

11: Lambdas allow for running of what other things?

A.   Binaries.

B.   All of these answers

C.   Executables

D.   Shell scripts

12: In what style must you write Lambda code?

A.   MVC

B.   Virtual

C.   Stateless

D.   Protocol

13: How can a developer provide Lambda code?

A.   By uploading a .zip file

B.   All of these answers

C.   By editing inline

D.   From an S3 bucket

14: You are performance-testing your Lambda to verify that you set the memory size adequately. Where do you verify the execution overhead?

A.   CLoudWatch logs

B.   DynamoDB logs

C.   S3 logs

D.   Lambda logs.

15: What facilitates continuous delivery of Lambdas?

A.   CodeStack

B.   ElasticStack

C.   Mobile Hub

D.   CodeDeploy

16: How are computing resources allocated to Lambdas?

A.   Proportionally

B.   Equally

C.   Periodically

D.   Daily

17: You can restrict the scope of a user's permissions by specifying which two items in an IAM policy?

A.   Resources and users

B.   Resources and conditions

C.   Events and users

D.   Events and conditions

18: What does Lambda logging include?

A.   Logging streams

B.   Rotating streams

C.   Logging events

D.   Advancing log groups

19: What can AWS Amplify NOT do for a Lambda?

A.   Create a Lambda

B.   Be an event source

C.   Assign an IAM role

D.   Delete a Lambda

20: How do you author a Lambda in a programming language that AWS does not support?

A.   Create a Lambda function with a custom runtime and reference the function in your Lambda

B.   Create a Lambda layer with a custom runtime and reference the layer in your lambda

C.   You cannot use Lambda in this situation

D.   Create a Lambda function with a custom runtime

21: What are listed downstream resources based on?

A.   The execution policy

B.   The Lambda configuration

C.   The Lambda nodes

D.   The IAM user

22: Which is an equivalent and valid tag for a pair of Lambdas?

A.   Department:Sales,department:Sales

B.   Department:Sales,department:sales

C.   Aws:demo;aws:demo

D.   Aws:demo;aws:DEMO

23: Outbound connections from Lambdas must be _.

A.   Neither of these answers

B.   UDP/IP

C.   TCP/IP

D.   Both of these answers

24: How are CloudWatch actions configured?

A.   Automatically

B.   None of these answers

C.   Manually

D.   Ad hoc

25: You are testing your stream-based application and the associated Lambda. AWS best practice advises you to test by varying what?

A.   Stream and record sizes

B.   Stream and shard sizes

C.   Batch and record sizes

D.   Batch and shard sizes

26: You need to make your Lambda available to services in multiple VPCs. What do you do?

A.   Place each subnet in a VPC. Associate all subnets to your Lambda.

B.   Place all subnets in a VPC. Associate all subnets to your Lambda.

C.   Configure your Lambda to be available to multiple VPCs.

D.   Configure all application VPCs to be peered.

27: How is the cost associated with Lambda function calculated?

A.   Number of function calls

B.   Amount of code run

C.   Compute time

D.   Amount of infrastructure used

28: What is the fastest way to get started with Lambda?

A.   Author a Lambda from scratch.

B.   Use a blueprint.

C.   Use a .zip deployment package.

D.   Use the serverless app repository.

29: Where is the disk space allocated for Lambda functions?

A.   /tmp

B.   /default

C.   /temp

D.   /ds

30: How do you stop a running Lambda that is stuck in a recursive loop?

A.   Delete the function.

B.   Set the function concurrent execution limit to 0 while you update the code.

C.   Reset the function.

D.   Set the function concurrent execution limit to 100 while you update the code.

31: What is AWS best practice for Lambda configuration?

A.   Overprovision memory to run your functions faster and reduce your costs. Do not overprovision your function timeout settings.

B.   Overprovision memory and your function timeout settings to run your functions faster and reduce your costs.

C.   Do not overprovision memory. Overprovision your function timeout settings to run your functions faster and reduce costs.

D.   Do not overprovision memory. Do not overprovision your function timeout settings to run your functions faster and reduce costs.

32: Basic Lambda permissions include permissions for what?

A.   Removing log groups

B.   None of these answers

C.   Creating log groups

D.   Updating log groups

33: How are environment variables stored?

A.   DynamoDB tables

B.   Key-value pairs

C.   S3 buckets

D.   None of these answers

34: You need to use a Lambda to provide backend logic to your website. Which service do you use to make your Lambda available to your website?

A.   S3

B.   API Gateway

C.   X-Ray

D.   DynamoDB

35: You are creating a Lambda to trigger on change to files in an S3 bucket. Where should you put the bucket name?

A.   In the Lambda function code

B.   In a Lambda environment variable

C.   In the Lambda tags

D.   In another S3 bucket

36: What action is needed before you can test a Lambda?

A.   Deploy the Lambda

B.   Export the function

C.   None of these answers

D.   Configure a test event

37: What kind of packages can you use with Node.js for Lambdas?

A.   Fleece

B.   NPM

C.   None of these answers

D.   Pod

38: Lambdas are monitored by default using which service?

A.   CloudTrail

B.   CloudWatch

C.   CloudFormation

D.   LogWatch

39: What can trigger a Lambda function execution?

A.   A table definition

B.   Queue isolation

C.   STS Write

D.   An SNS topic

40: You need to set an S3 event trigger on your Lambda to respond when data is added to your bucket from another S3 bucket. Which event type do you configure?

A.   POST

B.   "All object create events"

C.   PUT

D.   COPY

41: To make Lambdas more testable, it is AWS best practice to separate which of these?

A.   Lambda configuration from logging code

B.   Lambda handler from logging code

C.   Lambda handler from core logic

D.   Lambda configuration from core logic

42: What is included in an exported Lambda deployment package?

A.   YAML definition

B.   CloudFormation stack configuration

C.   SAML deployment stack

D.   Zip file of all related files

43: When can you change the execution role of a Lambda?

A.   Only at creation

B.   Only before deployment

C.   Never

D.   Anytime via configuration

44: What is the relationship between SAM template and CloudFormation template files?

A.   SAM templates are a superset of CloudFormation templates. SAM templates include additional resource types.

B.   SAM templates have some overlap with CloudFormation templates. Both SAM and CloudFormation templates include resource types that are not in the other type of template.

C.   CloudFormation templates are a superset of SAM templates. CloudFormation templates include additional resource types.

D.   SAM templates are a different name for CloudFormation templates. Both template types include the same resource types.

45: What service deploys Lambdas regionally?

A.   EdgeCloud

B.   CloudEdge

C.   CloudFront

D.   CloudStack

46: What programming language does AWS Lambda support?

A.   Custom

B.   All of these answers

C.   Java

D.   Ruby

47: You need to setup a mechanism to put controls in place to notify you when you have a spike in Lambda concurrency. What should you do?

A.   Deploy a CloudTrail alarm that notifies you when function metrics exceed your threshold. Create an AWS budget to monitor costs.

B.   Deploy a CloudWatch alarm that notifies you when function metrics exceed your threshold. Create an AWS budget to monitor costs.

C.   Deploy a CloudWatch alarm that notifies you when function metrics exceed your threshold. Create an AWS CostMonitor to monitor costs.

D.   Deploy a CloudTrail alarm that notifies you when function metrics exceed your threshold. Create an AWS CostMonitor to monitor costs.

48: When is Lambda code stored encrypted?

A.   At rest

B.   At runtime

C.   At deployment

D.   Non of these answers