Running Serverless Applications with AWS Lambda Educative Quiz Answers

Get Running Serverless Applications with AWS Lambda Educative Quiz Answers

In the world of modern development, serverless computing has become table stakes. Serverless computing has seen a major uptake with AWS Lambda having an increased adoption of 667% in 2018. Companies are making the switch to serverless for shorter time to market and decreased operational costs, but for you the advantage lies in the ability to offload the burden of managing infrastructure to serverless platforms, so you can focus on building even better apps.

In this course, you will learn how to run serverless applications using AWS Lambda. You’ll start with the basics such as creating a web service where you’ll learn the steps to deploy an AWS Serverless Application Model (SAM). You’ll then move on to more advanced topics such as handling HTTP Requests, using external storage, and managing sessions and user workflows. By the end of this course, you will be ready to work with AWS Lambda in a professional setting, and you’ll have a great, transferable skill that employers will love to see.

Enroll on Educative

Quiz 1:

Q1. Select all benefits of using AWS Lambda for a serverless application:

  • Reduced Operation Costs
  • Writing code becomes considerably easy
  • Unlimited Storage Capacity
  • Shorter time to market

Q2. Select all the factors on which the Lambda pricing depends:

  • Reserve Capacity
  • Maximum memory allowed for a task
  • Length of the code deployed
  • Time it takes for a task to execute

Q3. According to the Lambda pricing model, you have to pay extra for the staging and testing environments even if they are idle.

  • True
  • False

Q4. Which of the following is NOT a technical limitation of using AWS Lambda?

  • You cannot choose your type of processor.
  • You cannot execute a task beyond a certain time limit.
  • You cannot deploy new features and updates frequently.
  • The latency of processing a single request isn’t really deterministic.

Q5. I want to build an application that tracks vehicles and transmits their location coordinates to a server. The application will track a vehicle using computer vision technology (which processes dynamic images), detects the vehicle from camera images, and tracks its location. It must transmit the coordinates immediately to the server so that the server knows the exact location of the vehicle before it moves from that location. Is it advisable to use AWS Lambda for this application given the technical constraints?

  • Yes
  • No

Quiz 2:

Q1. What is the purpose of the --runtime argument in the sam init command?

  • It tells SAM how to call the application.
  • It specifies the name for the subdirectory where the application files are stored.
  • It tells SAM which programming language or execution environment is needed for the code to run.
  • It tells SAM how to handle runtime errors.

Q2. A CloudFormation stack is a source file describing an application infrastructure into a set of running, configured cloud resources.

  • True
  • False

Q3. You can only use a yaml format to make a CloudFormation template.

  • True
  • False

Q4. Select all the arguments necessary for Lambda functions:

  • Handler
  • Event
  • Context
  • Response

Q5. Which of the following is the purpose of the Resources sections in template.yaml?

  • It lists key information required for the users of a template or for clients connecting to this application.
  • It activates SAM features and resources, allowing us to use compact descriptions for many building blocks common to serverless applications.
  • It lists the services or resources for CloudFormation to configure.
  • It enables us to reduce the overall template file size by listing common settings in a single place instead of repeating them for each Lambda function.

Quiz 3:

Q1. A log group corresponds to a single running process.

  • True
  • False

Q2. What is the purpose of the -s flag in the sam logs command?

  • It will continuously check for updates and show new log outputs as they appear.
  • You can specify the starting point to show logs for a specific time segment.
  • It automatically searches logs and displays the messages matching a specific keyword.
  • It specifies the name of the stack that owns the function.

Q3. Select all the tools used to validate templates:

  • CFN Lint
  • ESLint
  • CodeStarLint
  • Chrome DevTools
  • Yamllint

Q4. Select all the possible ways of isolating resources with AWS SAM:

  • Create multiple stacks in a single account.
  • Use different virtual private clouds.
  • Use different IAM users.
  • Use different pipeline tools for deployment.

Q5. Fill in the blank: A _________ automates repetitive and error-prone tasks and orchestrates the work required to convert source code into a fully deployed application.

  • SAM building
  • SAM packaging
  • deployment pipeline
  • configuration template

Quiz 4:

Q1. With AWS Lambda, you can deploy your new code by uploading it to running containers or setting up new instances with the updated code and then destroying the old containers.

  • True
  • False

Q2. Which of the following refers to the name of a function?

  • Function_Name
  • PhysicalResourceId
  • LogicalResourceId
  • AWS::Function::Name

Q3. Fill in the blank: _________ are read-only copies of function configurations, and they are not wiped out after a subsequent update.

  • Aliases
  • Function templates
  • Published Versions
  • Latest Versions

Q4. Which of the following property is used to define an alias for a Lambda function?

  • AutoVersionAlias
  • AutoFunctionAlias
  • FunctionPublishAlias
  • AutoPublishAlias

Q5. Fill in the blank: Lambda supports automatic load balancing between versions assigned to the same alias, using a feature called _____________.

  • function configuration
  • version configuration
  • routing configuration
  • AWS CodeDeploy

Quiz 5:

Q1. Fill in the blank: In the API Gateway terminology, a _________ is an endpoint configured to handle an HTTP request on a specific path and with a specific HTTP method.

  • route
  • stage
  • resource
  • response

Q2. Select all the fields that must be present in the JSON object which the API Gateway expects as a response:

  • statusCode
  • message
  • body
  • headers

Q3. Fill in the blank: _________ APIs are served from a specific region, but the clients connect to the nearest AWS presence point.

  • Resource
  • Edge-optimised
  • Gateway
  • Regional

Q4. Which of the following is a special marker value supported by the API Gateway for HTTP methods that matches all methods?

  • matchAll
  • any
  • httpMethod
  • headers

Q5. What is the standard stage name used to configure events using the API Gateway?

  • hello-world
  • prod
  • hello
  • home

Quiz 6:

Q1. Simple Storage Services and DynamoDB are examples of which of the following cloud options?

  • Key-value Stores
  • Relational Databases
  • Network File Systems
  • Persistent Storage Services

Q2. Fill in the blank: _______ is/are an object store, designed for large binary unstructured data. It can store individual objects up to 5 TB. The objects are aggregated into buckets.

  • Key-value stores
  • S3
  • AWS BucketStore
  • DynamoDB

Q3. Which storage option is suitable if your application has the following requirements?

  1. It needs to perform atomic operations on a group of objects.
  2. It must query item contents.
  3. It does not have unpredictable burst traffic patterns.
  4. The items of the application are mostly 2KB in size.
  • Network File Systems
  • S3
  • DynamoDB
  • Relational Databases

Q4. Select all the parameters that are required by the standard S3 SDK method putObject to send data to a bucket:

  • Key
  • Response
  • Body
  • Bucket

Q5. Which of the following policies gives a Lambda function read and write access to all objects in a bucket?

  • S3ReadPolicy
  • LamdaFullAccessPolicy
  • S3FullAccessPolicy
  • LamdaReadWritePolicy

Quiz 7:

Q1. If an application server approves or rejects client requests, talks to back-end storage, schedules asynchronous processing, and passes back results to client devices, it is an example of a three-tier server setup.

  • True
  • False

Q2. Select all the features of Amazon Cognito:

  • Each user can get their own specific privileges and sign in to the client application with an IAM username and password, and the client application can directly use AWS SDK to access storage, databases, or queues.
  • It stores usernames and passwords securely, optionally allowing users to sign up themselves or even sign in through federated authentication systems.
  • It allows you to safely pass on temporary access rights with the account credentials to client devices. It does not require the creation of any kind of user records or up-front registration.
  • It allows users to read or write only certain fields of a DynamoDB record matching their ID.

Q3. Each IAM user has two keys. Select them from the list below:

  • an access key
  • a public key
  • a private key
  • a secret key

Q4. Fill in the blank: _________ takes a map of conditions such as the expiration time of the policy, partial or full matching on the uploaded file key, maximum allowed length, and the default access level for the uploaded file.

  • XMLHttpRequest
  • requestContext
  • s3.createPresignedPost
  • s3.uploadFile

Q5. Lambda functions work under temporary credentials that are only valid for a short period. Unfortunately, there is no way to generate signed URLs that last longer.

  • True
  • False

Quiz 8:

Q1. Select all the types of dead-letter queues that Lambda can use:

  • Amazon Notification Event Service
  • Amazon Simple Queue Service
  • Amazon Storage Notification Service
  • Amazon Simple Notification Service

Q2. With synchronous calls, errors can be reported directly back to the caller, but the caller cannot decide whether it’s worth retrying or not.

  • True
  • False

Q3. If there are no subscriptions to an event, what happens in the case of SNS if a message arrives?

  • It stores the message for a listener to retrieve it.
  • It will store it in a queue for a short time and then delete it if there are no listeners.
  • It will ignore the message, as there are no listeners.
  • It will delete the message, as there are no listeners.

Q4. Fill in the blanks:

In the sam local generate-event command, the first parameter after an generate-event is the ________. The second is the _________.

  • bucket name, service name
  • type of event, bucket name
  • service name, type of event
  • service name, function name

Q5. Fill in the blank:

CloudFormation can activate or deactivate resources based on certain conditions, which we need to set up in a separate template section titled _________.

  • Conditions
  • Resources
  • Events
  • AlarmNotifyOpsSubscription

Quiz 9:

Q1. Select all the purposes of the AWS Serverless Application Repository:

  • It stores the different files uploaded through a serverless application.
  • It works as a public library, making a few hundred open-source components available to everyone.
  • It contains templates for different serverless applications.
  • It enables organisations to share reusable components internally.

Q2. Fill in the blank:

The ______________ SAR component makes ImageMagick utilities available to Lambda functions in the form of a layer.

  • image-magick-lambda-layer
  • image-magick-lambda
  • ImageMagick
  • ImageMagickLambda

Q3. A single function can attach up to six layers.

  • True
  • False

Q4. Fill in the blank:

________ is the Software Package Data Exchange (SPDX) identifier for the application copyright license.

  • ReadmeUrl
  • LicenseUrl
  • SemanticVersion
  • SpdxLicenseId

Q5. Which of the following is true about Available Applications?

  • It is the client-side part, allowing you to build and package an application.
  • It is the administrative part, allowing you to edit and republish an application
  • It is the client-side part, allowing you to browse and deploy existing applications
  • It is the administrative part, allowing you to browse and deploy existing applications

Quiz 10:

Q1. AWS Lambda usually works by sending all requests from a single user to the same machine so that web servers can keep session state in memory.

  • True
  • False

Q2. Which endpoint is automatically activated by AWS when you create an S3 bucket?

  • Bucket endpoint
  • Website endpoint

Q3. Fill in the blank:

______ is an optional property for DeploymentResource that defines the access control for uploaded files.

  • Access-Control
  • ServiceToken
  • Acl
  • Access

Q4.Fill in the blank:

_________ is a managed hierarchical database intended for direct use by client devices, and it can automatically synchronise states across multiple clients, resolve conflicts, and even handle offline usage scenarios.

  • AWS AppSync
  • DynamoDB
  • AWS Cognito
  • AWS Application Database

Q5. Select all the uses of CloudFront:

  • It simplifies to write code for file transfer for the developer.
  • It compresses static files automatically before sending them to users.
  • It caches static files from S3 all over the world.
  • It automatically secures the file transfer from S3 to users.

Quiz 11:

Q1. Fill in the blank:

_________ is/are responsible for setting up the application components and translating between the business logic core and the Lambda environment.

  • Concrete adapters for interaction ports
  • Lambda entry-point code
  • The request processor
  • The Ports and Adaptors design pattern

Quiz 12:

Q1. Lambda never reuses existing container instances over a short period of time. This speeds up processing and avoids cold starts.

  • True
  • False

Q2. Select all the things through which you can share configurations apart from having a single template:

  • Nested stacks
  • Stack imports
  • A configuration store
  • Stack exports

Q3. Select all the ways needed by Lambda functions if they want to share behavior:

  • Common stack and bucket
  • Lambda Layers
  • Common libraries
  • Running from the same container

Q4. What is the purpose of having a Kinesis Data Streams?

  • starts and scales containers automatically based on demand, and charges you for actual usage only
  • automates workflow with AWS resources, taking up to a year
  • splits incoming events into shards and allows you to configure the partitioning data key
  • controls the total throughput of the system easily by configuring the number of shards.

Q5. Lambda charges for memory allocation multiplied by CPU time, so bundling tasks with different memory needs can be unnecessarily expensive.

  • True
  • False

I hope this Running Serverless Applications with AWS Lambda Educative Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published.