Unit 6: Serverless and Microservices Architectures - Practice Quiz

INT364 — Cloud Architecture And Implementation-Ii 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 What is the primary characteristic of a 'Serverless' architecture regarding infrastructure management?

A. There are no physical servers involved at all
B. Developers must manually patch the operating system
C. Servers are managed by a third-party consultant
D. Infrastructure management is offloaded to the cloud provider

2 Which of the following is a key benefit of the AWS Lambda pricing model?

A. You pay for the idle time when code is not running
B. You pay based on the size of the uploaded code zip file only
C. You pay a flat monthly fee regardless of usage
D. You pay only for the compute time consumed

3 In the context of AWS Lambda, what is a 'Cold Start'?

A. Starting a function using the AWS CLI
B. The latency experienced when a function is invoked after being idle
C. The time it takes to upload code to AWS
D. The process of rebooting the entire AWS region

4 Which AWS service allows you to create, publish, maintain, monitor, and secure APIs at any scale?

A. AWS Lambda
B. Amazon API Gateway
C. Amazon SNS
D. AWS Step Functions

5 What is the maximum execution timeout limit for a single AWS Lambda function invocation?

A. 1 hour
B. 15 minutes
C. 5 minutes
D. 24 hours

6 When configuring AWS Lambda, how is CPU power allocated?

A. You select the number of vCPUs directly
B. It is fixed for all functions regardless of configuration
C. It is allocated proportionally to the amount of memory configured
D. It is determined by the size of the code package

7 Which AWS service is a serverless compute engine for containers that works with both Amazon ECS and Amazon EKS?

A. AWS Fargate
B. AWS Beanstalk
C. Amazon EC2
D. Amazon Lightsail

8 In a microservices architecture, what is the primary role of Amazon ECS?

A. To act as an API Gateway
B. To store Docker images
C. To run Lambda functions
D. To orchestrate and manage Docker containers

9 Which principle of the Well-Architected Framework is addressed by using AWS X-Ray in a serverless application?

A. Operational Excellence
B. Cost Optimization
C. Sustainability
D. Reliability

10 What is the purpose of an 'Execution Role' in AWS Lambda?

A. To encrypt the function code
B. To allow users to login to the Lambda console
C. To define which users can delete the function
D. To grant the Lambda function permissions to access other AWS services

11 Which feature of Amazon API Gateway allows you to route requests to different versions of your API (e.g., prod, dev)?

A. Models
B. Stages
C. Methods
D. Resources

12 How should a stateless serverless function handle persistent data?

A. Data cannot be persisted in serverless architectures
B. Store it in an external stateful service like Amazon DynamoDB or S3
C. Store it in the function's local file system (/tmp) permanently
D. Keep it in a global variable within the code

13 What is 'Lambda Proxy Integration' in API Gateway?

A. A method to use EC2 instances as proxies
B. A way to cache API responses
C. A security feature to hide the Lambda ARN
D. A setup where the raw request is passed directly to Lambda and the function handles the response format

14 Which AWS container service is best suited for users who want to use Kubernetes without managing the control plane?

A. Amazon EKS
B. Amazon ECR
C. Amazon ECS
D. AWS Lambda

15 To 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. Usage Plans
B. CORS
C. Throttling
D. API Caching

16 What is a 'Layer' in AWS Lambda?

A. A security group setting
B. A versioning tool for API Gateway
C. A backup of the function code
D. A mechanism to pull in additional code or libraries separately from the main deployment package

17 Which Well-Architected principle suggests using 'asynchronous' design patterns (like SQS) to decouple serverless components?

A. Cost Optimization
B. Reliability
C. Security
D. Sustainability

18 What 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

19 What is the purpose of Amazon ECR (Elastic Container Registry)?

A. To load balance container traffic
B. To store, manage, and deploy Docker container images
C. To run containers
D. To monitor container logs

20 Which architectural pattern is commonly used in serverless to handle complex workflows involving multiple Lambda functions?

A. Orchestration using AWS Step Functions
B. Hard-coding calls inside functions
C. Manual triggering
D. Monolithic architecture

21 Regarding Security in Serverless (Well-Architected), what is the 'Principle of Least Privilege'?

A. Giving all functions Admin access to ensure they work
B. Using only public subnets
C. Granting only the permissions necessary to perform a task
D. Removing all permissions from functions

22 Which mechanism can be used to authorize API Gateway requests using a Lambda function?

A. Lambda Authorizer
B. IAM Policy
C. Security Groups
D. NACLs

23 How 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

24 What is the 'Launch Type' in Amazon ECS where you manage the underlying EC2 instances?

A. Serverless Launch Type
B. Hybrid Launch Type
C. Fargate Launch Type
D. EC2 Launch Type

25 Which environment variable helps handle database connection reuse in AWS Lambda to improve performance?

A. lambda.keepAlive = true
B. context.timeout = 0
C. process.env.DB_REUSE = true
D. context.callbackWaitsForEmptyEventLoop = false

26 Ideally, how should a serverless function be designed regarding 'idempotency'?

A. It should produce the same result if executed multiple times with the same input
B. It doesn't matter
C. It should produce different results every time
D. It should only be executable once per day

27 Which 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. AWS OpsWorks
D. Amazon RDS

28 What is the maximum amount of ephemeral storage (/tmp) available to a Lambda function (as of recent updates)?

A. Unlimited
B. Up to 10 GB
C. 512 MB only
D. Up to 100 GB

29 In a serverless architecture, where do application logs typically go by default?

A. They are deleted immediately
B. Amazon S3
C. Amazon CloudWatch Logs
D. A local text file

30 Which API Gateway endpoint type is best suited for clients located geographically close to a specific AWS region?

A. Private
B. Regional
C. Global
D. Edge-Optimized

31 To 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. NAT Gateway
C. Internet Gateway
D. VPC Link

32 What is 'Provisioned Concurrency' in AWS Lambda designed to solve?

A. High storage costs
B. Security vulnerabilities
C. Cold start latency
D. Memory leaks

33 Which service acts as a 'Service Mesh' to standardize how microservices communicate on AWS (ECS/EKS)?

A. Amazon Connect
B. AWS Glue
C. Amazon MQ
D. AWS App Mesh

34 When building a serverless web application, which service is commonly used to host static assets (HTML/CSS/JS)?

A. Amazon S3
B. Amazon API Gateway
C. AWS Lambda
D. Amazon DynamoDB

35 What is the primary constraint of the 'Lambda' processing model regarding processing time?

A. It is designed for long-running batch jobs (hours)
B. It is designed for short-lived, event-driven tasks
C. It pauses during high traffic
D. It must run continuously

36 How does AWS Fargate differ from the EC2 launch type in terms of pricing?

A. Fargate charges per instance per hour
B. Fargate is free
C. Fargate charges based on the number of users
D. Fargate charges based on vCPU and memory resources consumed per second

37 Which Well-Architected principle implies using Managed Services (like DynamoDB or SQS) over self-managed servers to reduce environmental impact?

A. Sustainability
B. Security
C. Performance Efficiency
D. Operational Excellence

38 In API Gateway, what is 'Throttling'?

A. Encrypting the data
B. Increasing the speed of the API
C. Blocking all traffic
D. Limiting the number of requests a user can make per second

39 What is a 'Dead Letter Queue' (DLQ) used for in Lambda?

A. Storing events that failed to process after all retry attempts
B. Sending emails to developers
C. Storing successfully processed events
D. Queueing requests when the system is cold

40 Which AWS service is used for service discovery in ECS to allow containers to find each other by name?

A. AWS Config
B. Amazon Route 53 (Public)
C. AWS Cloud Map
D. Amazon CloudFront

41 When defining a Lambda function in CloudFormation, where is the code usually located?

A. On a physical USB drive
B. In Amazon RDS
C. Hardcoded in the template (for very small functions) or in an S3 bucket
D. In an EC2 instance

42 Which architectural pattern involves replacing a monolithic application incrementally with microservices?

A. Adapter Pattern
B. Strangler Fig Pattern
C. Factory Pattern
D. Singleton Pattern

43 What is the function of the 'Task Definition' in Amazon ECS?

A. It acts as a load balancer
B. It is a blueprint that describes how a docker container should launch
C. It monitors the cost of the cluster
D. It installs the Docker engine

44 How can you secure environment variables in AWS Lambda that contain sensitive information?

A. Store them in the function code comments
B. Save them in the description field
C. Use AWS KMS (Key Management Service) to encrypt them
D. Write them in plain text in the console

45 Which integration type in API Gateway is necessary if you need to transform the client request body before sending it to the backend?

A. HTTP Proxy
B. Mock Integration
C. AWS Integration (Non-Proxy)
D. Lambda Proxy Integration

46 For a memory-intensive image processing microservice, which configuration change in Lambda will most likely improve execution speed?

A. Increasing the Timeout
B. Using Python instead of Node.js
C. Reducing the code size
D. Increasing the Memory allocation

47 What is 'Event Source Mapping' in AWS Lambda?

A. A configuration that polls a stream or queue (like Kinesis or SQS) and invokes the function
B. A diagram of the architecture
C. A map of where AWS data centers are located
D. A way to map IP addresses

48 When running microservices on EKS, what is a 'Pod'?

A. The smallest deployable unit of computing in Kubernetes
B. A networking rule
C. A storage volume
D. A specific type of EC2 instance

49 Which HTTP method is typically used in API Gateway to handle CORS preflight requests?

A. DELETE
B. POST
C. OPTIONS
D. GET

50 What is the primary benefit of using 'Aliases' in AWS Lambda?

A. They point to specific versions of a function, allowing for traffic shifting and rollback
B. They increase the memory limit
C. They automatically debug the code
D. They allow you to rename the function