Practice Test

True/False: AWS Lambda is a serverless computing technology that runs your code in response to events and automatically manages the underlying compute resources for you.

  • True
  • False

Answer: True

Explanation: AWS Lambda is a service that lets you run your code without provisioning or managing servers. It executes your code only when needed and scales automatically.

True/False: Serverless architecture means that the servers are not required to run applications.

  • True
  • False

Answer: False

Explanation: Despite its name, serverless does not mean servers are not involved – the server management is done by AWS. Users can run their code without thinking about servers.

AWS Fargate is a serverless compute engine for what type of services?

  • a) EC2 service
  • b) EBS service
  • c) Containers services
  • d) Lambda service

Answer: c) Containers services

Explanation: Fargate is a technology that you can use with Amazon ECS and EKS to run containers without having to manage servers or clusters.

Which of the following are benefits of using serverless technologies? [Select all that apply]

  • a) No server management
  • b) Continuous scaling
  • c) High costs
  • d) Automated high availability

Answer: a) No server management, b) Continuous scaling, d) Automated high availability

Explanation: Serverless technologies provide the advantage of no server management, continuous scaling based on demand, and automated high availability.

True/False: AWS Lambda supports code deployment through AWS Serverless Application Model (SAM).

  • True
  • False

Answer: True

Explanation: The AWS Serverless Application Model (AWS SAM) is an open-source framework for building serverless applications. It simplifies the process of deploying AWS Lambda functions.

AWS Fargate allows to run containers without:

  • a) Managing clusters
  • b) Managing EC2 instances
  • c) Both a and b
  • d) None of the above

Answer: c) Both a and b

Explanation: AWS Fargate is a serverless compute engine for containers. It works with both Amazon ECS and Amazon EKS and allows you to run containers without managing clusters or servers.

What are the use cases for serverless technologies? [Select all that apply]

  • a) Big data
  • b) Real-time file processing
  • c) Data transformation
  • d) Web applications

Answer: a) Big data, b) Real-time file processing, c) Data transformation, d) Web applications

Explanation: The use cases for serverless technologies are wide-ranging, such as performing big data analysis, real-time file processing, data transformation, and powering web applications.

True/False: You can use AWS Fargate to run Docker applications.

  • True
  • False

Answer: True

Explanation: AWS Fargate allows you to use Docker and other container technologies to package and distribute your applications.

How can developers trigger AWS Lambda functions? [Select all that apply]

  • a) HTTP requests via Amazon API Gateway
  • b) Modifications to objects in Amazon S3 buckets
  • c) Updates to DynamoDB tables
  • d) State changes in AWS Step Functions

Answer: a) HTTP requests via Amazon API Gateway, b) Modifications to objects in Amazon S3 buckets, c) Updates to DynamoDB tables, d) State changes in AWS Step Functions

Explanation: AWS Lambda can be triggered by various services within AWS such as Amazon API Gateway, S3 bucket changes, DynamoDB table updates and state changes in AWS Step Functions.

True/False: In serverless architecture, you have to plan for capacity requirement and upgrade the servers when necessary.

  • True
  • False

Answer: False

Explanation: In serverless architecture, capacity management is abstracted away. It automatically scales based on the incoming traffic and you are charged only for the usage.

AWS Fargate can be used in combination with which of the following? [Select all that apply]

  • a) Amazon ECS
  • b) Amazon EKS
  • c) AWS S3
  • d) AWS EC2

Answer: a) Amazon ECS, b) Amazon EKS

Explanation: AWS Fargate is a technology you can use with Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS), not S3 or EC

True/False: AWS Lambda supports the Python programming language.

  • True
  • False

Answer: True

Explanation: AWS Lambda supports multiple programming languages, including Python, Node.js, Java, C#, Go, etc.

True/False: With serverless technology, you need to patch and update servers.

  • True
  • False

Answer: False

Explanation: Serverless technology eliminates the need to provision, scale, and maintain servers to run applications, databases, and storage systems. It also eliminates the need for patching and updating servers.

True/False: AWS Fargate supports automatic scaling.

  • True
  • False

Answer: True

Explanation: AWS Fargate supports automatic scaling. You can define your scaling requirements, and AWS Fargate will automatically adjust capacity as needed.

What is the primary pricing consideration for AWS Lambda?

  • a) Number of EC2 instances
  • b) Hours of server uptime
  • c) Amount of outbound data transfer
  • d) Number of requests and execution time

Answer: d) Number of requests and execution time

Explanation: With AWS Lambda, you are charged based on the number of requests for your functions and the time your code executes.

Interview Questions

What is AWS Lambda in the context of serverless technologies and patterns?

AWS Lambda is a compute service that allows you to run your code without provisioning or managing servers. It executes your code only when needed and scales automatically, from a few requests per day to thousands per second.

Can we use any programming language with AWS Lambda?

No, we can not use any programming language with AWS Lambda. It currently supports only a limited number of languages such as Node.js, Python, Java, and C#.

What is AWS Fargate regarding serverless technologies?

AWS Fargate is a compute engine for Amazon ECS and EKS that allows you to run containers without having to manage servers or clusters.

How does AWS Lambda handle scaling?

AWS Lambda automatically scales your applications in response to incoming request traffic. You don’t need to provision or scale up/down your capacities.

How are you charged for AWS Lambda?

With AWS Lambda, you pay only for what you use. You are charged based on the number of requests for your functions and the duration, the time it takes for your code to execute.

How does AWS Fargate handle scalability?

AWS Fargate allows for on-demand scaling, meaning as your application’s load changes, it will automatically adjust the compute resources.

What is a cold start in AWS Lambda?

A cold start in AWS Lambda occurs when you execute an inactive function for the first time. It includes the time it takes to load your function and run your initialization code.

What is the maximum execution time for an AWS Lambda function?

As of October 2020, the maximum execution duration per request for an AWS Lambda function is 900 seconds or 15 minutes.

What’s the maximum memory you can allocate to AWS Lambda function?

The maximum amount of memory that can be allocated to a Lambda function is 10,240 MB.

How are you billed for AWS Fargate?

With AWS Fargate, you are billed based on the vCPU and memory resources consumed by your containerized applications.

Can AWS Lambda functions access resources in a VPC?

Yes, AWS Lambda functions can access resources within a VPC by default, but outbound internet access requires a NAT gateway.

What is AWS Step Functions in the context of serverless technologies?

AWS Step Functions is a serverless workflow service used to coordinate multiple AWS services into serverless workflows.

Does AWS Fargate support all types of ECS task scheduling strategies?

No, currently, AWS Fargate supports only the REPLICA strategy, not the DAEMON strategy for task scheduling.

What is the primary purpose of Amazon CloudWatch in relation to AWS Lambda?

Amazon CloudWatch is used to monitor AWS Lambda. It collects and tracks metrics, collects and monitors log files, sets alarms, and automatically reacts to changes in your AWS resources.

Leave a Reply

Your email address will not be published. Required fields are marked *