Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 6 MCQsServerless and Microservices Architectures
Question 1 of 60 · Serverless and architectural considerations · Easy
What does the term serverless computing primarily mean?
Not quite. Try another option.
Answer: Cloud providers manage the underlying servers
In serverless computing, the cloud provider provisions, maintains, and scales the underlying infrastructure.
Question 2 of 60 · Serverless and architectural considerations · Easy
Which is a common benefit of a serverless architecture?
Not quite. Try another option.
Answer: Automatic resource scaling
Serverless platforms can automatically scale resources according to incoming demand.
Question 3 of 60 · Serverless and architectural considerations · Easy
Why should serverless functions generally be designed as stateless?
Not quite. Try another option.
Answer: Function instances may be temporary
A serverless function instance may be created or removed at any time, so persistent state should be stored externally.
Question 4 of 60 · Serverless and architectural considerations · Easy
Which architectural style is commonly associated with serverless applications?
Not quite. Try another option.
Answer: Event-driven architecture
Serverless functions commonly execute in response to events such as file uploads, API requests, or messages.
Question 5 of 60 · Building serverless applications with AWS Lambda · Easy
What is AWS Lambda primarily used for?
Not quite. Try another option.
Answer: Running code in response to events
AWS Lambda runs application code when an event occurs without requiring users to manage servers.
Question 6 of 60 · Building serverless applications with AWS Lambda · Easy
What is the purpose of a Lambda function handler?
Not quite. Try another option.
Answer: To receive and process an event
The handler is the entry point that AWS Lambda invokes to process an event.
Question 7 of 60 · Building serverless applications with AWS Lambda · Easy
Which event can directly trigger an AWS Lambda function?
Not quite. Try another option.
Answer: An Amazon S3 object upload
Amazon S3 can invoke a Lambda function when an event such as an object upload occurs.
Question 8 of 60 · Building serverless applications with AWS Lambda · Easy
What allows an AWS Lambda function to access other AWS services securely?
Not quite. Try another option.
Answer: An IAM execution role
A Lambda execution role provides permissions for the function to access AWS services and resources.
Question 9 of 60 · Extending functionality using Amazon API Gateway · Easy
What is the main purpose of Amazon API Gateway?
Not quite. Try another option.
Answer: Creating and managing APIs
Amazon API Gateway is used to create, publish, secure, monitor, and manage APIs.
Question 10 of 60 · Extending functionality using Amazon API Gateway · Easy
How can Amazon API Gateway work with AWS Lambda?
Not quite. Try another option.
Answer: It invokes Lambda for API requests
API Gateway can receive a client request and invoke a Lambda function to process it.
Question 11 of 60 · Extending functionality using Amazon API Gateway · Easy
Which AWS service can help authenticate API Gateway users?
Not quite. Try another option.
Answer: Amazon Cognito
Amazon Cognito can provide user authentication and authorization for APIs exposed through API Gateway.
Question 12 of 60 · Extending functionality using Amazon API Gateway · Easy
Which HTTP method is commonly used to retrieve a resource through an API?
Not quite. Try another option.
Answer: GET
The HTTP GET method is commonly used to retrieve a resource without modifying it.
Question 13 of 60 · Running microservices with AWS container services · Easy
Which AWS service is designed to orchestrate Docker-compatible containers?
Not quite. Try another option.
Answer: Amazon ECS
Amazon Elastic Container Service (Amazon ECS) is a managed service for deploying and orchestrating containers.
Question 14 of 60 · Running microservices with AWS container services · Easy
Which AWS service provides managed Kubernetes clusters?
Not quite. Try another option.
Answer: Amazon EKS
Amazon Elastic Kubernetes Service (Amazon EKS) is AWS's managed Kubernetes service.
Question 15 of 60 · Running microservices with AWS container services · Easy
What does AWS Fargate allow developers to do?
Not quite. Try another option.
Answer: Run containers without managing servers
AWS Fargate provides serverless compute for containers, removing the need to manage container hosts.
Question 16 of 60 · Running microservices with AWS container services · Easy
What is a key characteristic of a microservice?
Not quite. Try another option.
Answer: It can be deployed independently
A microservice focuses on a specific capability and can generally be developed and deployed independently.
Question 17 of 60 · Applying Well-Architected principles to serverless architectures · Easy
Which practice supports the Security pillar in a serverless architecture?
Not quite. Try another option.
Answer: Applying least-privilege permissions
Least privilege limits each function or user to only the permissions required for its tasks.
Question 18 of 60 · Applying Well-Architected principles to serverless architectures · Easy
Which AWS service is commonly used to monitor Lambda metrics and logs?
Not quite. Try another option.
Answer: Amazon CloudWatch
Amazon CloudWatch collects Lambda metrics and logs to help monitor application behavior.
Question 19 of 60 · Applying Well-Architected principles to serverless architectures · Easy
Which serverless pricing characteristic supports the Cost Optimization pillar?
Not quite. Try another option.
Answer: Paying for actual usage
Serverless services commonly charge according to actual requests and resource usage, reducing idle-capacity costs.
Question 20 of 60 · Applying Well-Architected principles to serverless architectures · Easy
Which practice can improve the reliability of event-driven serverless processing?
Not quite. Try another option.
Answer: Using retries and dead-letter queues
Retries handle temporary failures, while dead-letter queues preserve events that could not be processed successfully.
Question 21 of 60 · Serverless and architectural considerations · Medium
An image-processing workload receives unpredictable traffic spikes and remains idle for several hours each day. Which architecture best minimizes operational effort and idle cost?
Not quite. Try another option.
Answer: Run AWS Lambda functions triggered by Amazon S3 events
Lambda scales in response to S3 events and charges primarily for requests and execution time, making it suitable for intermittent workloads.
Question 22 of 60 · Serverless and architectural considerations · Medium
A serverless shopping-cart function must preserve cart data across multiple invocations. Where should the application store this state?
Not quite. Try another option.
Answer: In an external service such as Amazon DynamoDB
Lambda execution environments are ephemeral and may not be reused. Durable state should therefore be stored in an external service such as DynamoDB.
Question 23 of 60 · Serverless and architectural considerations · Medium
A synchronous serverless API has strict latency requirements, but users occasionally experience delays when new Lambda execution environments are created. Which change most directly reduces this issue?
Not quite. Try another option.
Answer: Enable provisioned concurrency for the function
Provisioned concurrency keeps a specified number of Lambda environments initialized, reducing cold-start latency for synchronous requests.
Question 24 of 60 · Serverless and architectural considerations · Medium
An order API invokes a payment-processing component. Temporary payment-service failures must not cause orders to be lost, and the API should respond quickly. Which design is most appropriate?
Not quite. Try another option.
Answer: Place orders in Amazon SQS and process them asynchronously
SQS decouples the API from payment processing, preserves messages during temporary failures, and allows the API to return without waiting for payment completion.
Question 25 of 60 · Building serverless applications with AWS Lambda · Medium
A Lambda function must create thumbnails whenever users upload images to a specific Amazon S3 bucket. What is the most direct event configuration?
Not quite. Try another option.
Answer: Configure an S3 object-created event to invoke the function
An S3 object-created event can invoke Lambda automatically when a new image is uploaded, avoiding polling and additional infrastructure.
Question 26 of 60 · Building serverless applications with AWS Lambda · Medium
An SQS-triggered Lambda function may receive the same message more than once. The function writes payment records to a database. Which implementation prevents duplicate charges?
Not quite. Try another option.
Answer: Use an idempotency key for each payment operation
SQS and Lambda provide at-least-once processing, so duplicate delivery is possible. An idempotency key ensures repeated processing has the same effect as one operation.
Question 27 of 60 · Building serverless applications with AWS Lambda · Medium
A Lambda function consumes records rapidly, but its relational database can handle only 50 simultaneous connections. Which configuration best protects the database?
Not quite. Try another option.
Answer: Set the function's reserved concurrency to 50
Reserved concurrency can cap the function's concurrent executions, limiting the number of simultaneous attempts to connect to the database.
Question 28 of 60 · Building serverless applications with AWS Lambda · Medium
A document workflow contains validation, approval, and notification Lambda functions. It needs branching, retries, and execution history. Which AWS service should coordinate the workflow?
Not quite. Try another option.
Answer: AWS Step Functions
Step Functions orchestrates multiple functions using state machines and supports branching, retries, error handling, and execution history.
Question 29 of 60 · Extending functionality using Amazon API Gateway · Medium
A company wants to expose a Lambda function as a synchronous HTTPS endpoint that accepts POST requests. Which integration is most appropriate?
Not quite. Try another option.
Answer: An API Gateway route integrated with Lambda
API Gateway can expose HTTPS routes, process POST requests, and synchronously invoke a Lambda function as the backend.
Question 30 of 60 · Extending functionality using Amazon API Gateway · Medium
A mobile application receives JSON Web Tokens from an identity provider. The API must reject invalid tokens before invoking its Lambda backend. Which API Gateway feature should be used?
Not quite. Try another option.
Answer: A JWT authorizer
A JWT authorizer validates token signatures and claims at API Gateway before an authorized request reaches the Lambda integration.
Question 31 of 60 · Extending functionality using Amazon API Gateway · Medium
A public REST API is overwhelming its backend during sudden traffic bursts. Which API Gateway configuration most directly limits the request rate reaching the backend?
Not quite. Try another option.
Answer: Configure stage-level throttling
Stage-level throttling sets request-rate and burst limits, helping protect backend services from excessive traffic.
Question 32 of 60 · Extending functionality using Amazon API Gateway · Medium
A legacy backend expects a field named customer_id, but API clients send customerId. The backend code cannot be changed. Which API Gateway feature can adapt the request?
Not quite. Try another option.
Answer: An integration request mapping template
An integration request mapping template can transform the incoming payload before API Gateway forwards it to the backend.
Question 33 of 60 · Running microservices with AWS container services · Medium
A team wants to run containerized microservices using Amazon ECS without provisioning or managing EC2 worker instances. Which compute option should it select?
Not quite. Try another option.
Answer: AWS Fargate
Fargate provides serverless compute for ECS tasks, so the team does not need to provision or manage container hosts.
Question 34 of 60 · Running microservices with AWS container services · Medium
An organization has existing Kubernetes manifests and requires Kubernetes APIs for its containerized microservices. Which AWS service is the best fit?
Not quite. Try another option.
Answer: Amazon Elastic Kubernetes Service
Amazon EKS provides a managed Kubernetes control plane and supports standard Kubernetes APIs and manifests.
Question 35 of 60 · Running microservices with AWS container services · Medium
Three ECS services must share one public endpoint. Requests to /orders, /users, and /catalog must be sent to different services. Which component should perform this routing?
Not quite. Try another option.
Answer: An Application Load Balancer with path-based rules
An Application Load Balancer supports HTTP path-based routing and can forward each path to a different ECS target group.
Question 36 of 60 · Running microservices with AWS container services · Medium
An order microservice must notify an inventory microservice, but inventory updates can occur asynchronously. Which design best reduces tight coupling between the services?
Not quite. Try another option.
Answer: Publish inventory update messages to Amazon SQS
SQS provides asynchronous message delivery and buffers requests, allowing the two microservices to scale and recover independently.
Question 37 of 60 · Applying Well-Architected principles to serverless architectures · Medium
Five Lambda functions currently share one IAM role with broad permissions. Which change best follows the security pillar of the AWS Well-Architected Framework?
Not quite. Try another option.
Answer: Assign each function a least-privilege IAM role
Separate least-privilege roles reduce the permissions available to each function and limit the impact of a compromised component.
Question 38 of 60 · Applying Well-Architected principles to serverless architectures · Medium
An asynchronously invoked Lambda function occasionally fails after all configured retries. The application must retain failed events for later investigation and reprocessing. What should be configured?
Not quite. Try another option.
Answer: An on-failure destination or dead-letter queue
An on-failure destination or dead-letter queue preserves events that could not be processed, supporting recovery and operational analysis.
Question 39 of 60 · Applying Well-Architected principles to serverless architectures · Medium
A request passes through API Gateway and several Lambda functions. Operators need to identify where latency occurs across the complete request path. Which approach provides the most useful observability?
Not quite. Try another option.
Answer: Enable AWS X-Ray tracing and propagate correlation identifiers
Distributed tracing and correlation identifiers connect activity across services, helping operators locate latency and failures in an end-to-end request.
Question 40 of 60 · Applying Well-Architected principles to serverless architectures · Medium
A Lambda function has been assigned 3,008 MB of memory, but monitoring shows low CPU use and short, simple executions. Which action best supports cost optimization without assuming that the smallest memory setting is ideal?
Not quite. Try another option.
Answer: Test multiple memory sizes and compare cost-duration results
Lambda memory also affects CPU allocation and execution time. Testing several configurations identifies the best balance between duration, performance, and cost.
Question 41 of 60 · Serverless and architectural considerations · Hard
An order service writes an order to DynamoDB and then publishes an OrderCreated event to EventBridge. A process failure between these operations sometimes leaves orders without events. Which design most reliably eliminates this dual-write inconsistency?
Not quite. Try another option.
Answer: Write the order and an outbox item in one DynamoDB transaction, then relay outbox records through DynamoDB Streams
The transactional outbox pattern atomically persists the business change and event intent. DynamoDB Streams can then relay the event with idempotent processing, avoiding an unsafe cross-service dual write.
Question 42 of 60 · Serverless and architectural considerations · Hard
A workload maintains thousands of long-lived bidirectional connections, performs steady CPU-intensive processing continuously, and has highly predictable 24-hour utilization. Which architecture is the strongest default choice?
Not quite. Try another option.
Answer: Run the workload as long-running ECS services and scale tasks around sustained capacity requirements
Long-lived connections and sustained CPU utilization favor container services. Lambda execution limits and repeated state reconstruction make it a poor fit for continuously running connection-oriented processing.
Question 43 of 60 · Serverless and architectural considerations · Hard
A multi-tenant event processor has one high-volume tenant that can exhaust concurrency and delay events for premium tenants. Which redesign provides the strongest workload-level bulkhead isolation?
Not quite. Try another option.
Answer: Route tenant classes to separate queues and functions, then assign reserved concurrency to each function
Separate queues and functions create independent backlogs, while reserved concurrency prevents one class from consuming capacity allocated to another. FIFO message groups preserve ordering but do not provide concurrency bulkheads.
Question 44 of 60 · Serverless and architectural considerations · Hard
One domain event must be consumed independently by billing, analytics, and notification services. A failure or slowdown in analytics must not delay the other consumers. Which topology best satisfies this requirement?
Not quite. Try another option.
Answer: Publish to an SNS topic with a separate SQS queue and dead-letter queue for each consumer
SNS provides fan-out, and a queue per consumer isolates buffering, retries, scaling, and failures. A shared queue distributes messages among consumers rather than delivering every event to each consumer.
Question 45 of 60 · Building serverless applications with AWS Lambda · Hard
A Lambda event source mapping reads SQS messages in batches of 10. If one message fails, nine successful messages are repeatedly processed with the retried batch. Which change minimizes redundant work without assuming exactly-once delivery?
With ReportBatchItemFailures, Lambda retries only the reported SQS messages. Idempotency remains necessary because SQS and Lambda event source mappings can still deliver duplicates.
Question 46 of 60 · Building serverless applications with AWS Lambda · Hard
A Lambda function consumes a Kinesis shard in order. One malformed record repeatedly fails its batch and prevents later records in the shard from being processed. Which configuration best limits the blockage while preserving recovery evidence?
Not quite. Try another option.
Answer: Enable batch bisection, configure finite retry or record-age limits, and send discarded failures to a destination
Batch bisection isolates the poison record, while bounded retries or record age eventually unblock the shard. An event source mapping failure destination preserves information for investigation and recovery.
Question 47 of 60 · Building serverless applications with AWS Lambda · Hard
An AWS account has a Lambda regional concurrency quota of 1,000. Function A is assigned reserved concurrency of 400 but currently uses only 100. Function B has no reserved concurrency. Ignoring burst-rate limits and other functions, what is Function B's maximum concurrency?
Not quite. Try another option.
Answer: 600, because Function A's reserved allocation is removed from the shared unreserved pool
Reserved concurrency both caps a function and reserves capacity for it. Function A's full allocation of 400 is unavailable to unreserved functions, leaving for Function B.
Question 48 of 60 · Building serverless applications with AWS Lambda · Hard
A team needs to shift 10% of production traffic to a new Lambda release and automatically return all traffic to the previous release when a CloudWatch alarm enters ALARM. Which deployment mechanism is most appropriate?
Not quite. Try another option.
Answer: Publish immutable versions, route through a weighted alias, and use CodeDeploy alarm-based rollback
Lambda aliases can split traffic between immutable versions. CodeDeploy supports canary or linear traffic shifting and can roll back the alias when configured CloudWatch alarms fire.
Question 49 of 60 · Extending functionality using Amazon API Gateway · Hard
An API Gateway REST API caches GET /profile, whose response depends on the authenticated user. The method path and query string are identical for all users. Which configuration prevents one user's cached profile from being returned to another user while retaining caching?
Not quite. Try another option.
Answer: Add the validated Authorization header to the method's cache key and keep authorization enabled
User-dependent inputs must participate in the cache key. Using the validated authorization value isolates cached entries, although a stable trusted user identifier may provide better cache efficiency when available.
Question 50 of 60 · Extending functionality using Amazon API Gateway · Hard
An API operation starts a report that can require several minutes. Clients currently keep an API Gateway request open until a Lambda workflow finishes, causing integration timeouts and retries. Which API design is most resilient?
Not quite. Try another option.
Answer: Return 202 Accepted with an operation ID, start work asynchronously, and expose a status endpoint
The asynchronous request-reply pattern decouples API latency from long-running work. An operation resource supports polling, callbacks, retries, and explicit job-state management.
Question 51 of 60 · Extending functionality using Amazon API Gateway · Hard
A Lambda proxy integration completes successfully but returns { "result": "ok" } directly. API Gateway responds to the client with 502 Bad Gateway. What is the most likely correction?
Not quite. Try another option.
Answer: Return a proxy response containing statusCode, optional headers, and a string-valued body
Lambda proxy integrations require a specific response envelope. A malformed output, even from a successful invocation, causes API Gateway to return a 502 response.
Question 52 of 60 · Extending functionality using Amazon API Gateway · Hard
An HTTP API exposes routes to OAuth 2.0 clients. Only tokens with the orders.write scope may call POST /orders, and the Lambda function must not be directly invocable by unrelated AWS resources. Which design best meets both requirements?
Not quite. Try another option.
Answer: Use a JWT authorizer with route scopes and restrict Lambda invocation permission by API execution ARN
A JWT authorizer validates issuer, audience, signature, and required route scopes. A Lambda resource-based permission constrained by the API's execution ARN reduces unintended direct invocation.
Question 53 of 60 · Running microservices with AWS container services · Hard
ECS tasks on Fargate run in private subnets without public IP addresses. They must pull private ECR images and send logs to CloudWatch Logs without using a NAT gateway. Which endpoint set is required for this path?
Not quite. Try another option.
Answer: ECR API and ECR Docker interface endpoints, an S3 gateway endpoint, and a CloudWatch Logs interface endpoint
Private ECR pulls require ECR API and Docker registry connectivity, while image layers are retrieved through S3. The awslogs driver also needs connectivity to CloudWatch Logs.
Question 54 of 60 · Running microservices with AWS container services · Hard
An ECS Fargate task has an application container reserving 512 CPU units and 1,024 MiB, plus a sidecar reserving 256 CPU units and 512 MiB. What is the smallest listed valid task size that can satisfy the combined reservations?
Not quite. Try another option.
Answer: 1 vCPU and 2 GiB
The containers require 768 CPU units and 1,536 MiB in total. A 0.5-vCPU task provides only 512 CPU units, while the valid 1-vCPU and 2-GiB combination satisfies both totals.
Question 55 of 60 · Running microservices with AWS container services · Hard
An ECS worker service processes an SQS queue. Message arrival rates vary sharply, and processing time per message is approximately stable. CPU utilization remains low even when the queue is growing. Which scaling signal best reflects required capacity?
Not quite. Try another option.
Answer: A target-tracking metric based on visible queue messages divided by the number of running tasks
Backlog per task represents the amount of queued work each worker must absorb. CPU can remain low for I/O-bound processing and therefore may not track service latency or queue growth.
Question 56 of 60 · Running microservices with AWS container services · Hard
An ECS service uses Fargate and awsvpc networking with an Application Load Balancer. Tasks receive dynamically allocated private IP addresses. Which target group configuration is required?
Not quite. Try another option.
Answer: Use target type ip and allow ECS to register each task's elastic network interface address
Fargate tasks using awsvpc have their own elastic network interfaces and are registered by IP address. The underlying infrastructure instances are not exposed for instance target registration.
Question 57 of 60 · Applying Well-Architected principles to serverless architectures · Hard
Critical and best-effort Lambda workloads share an account. During traffic spikes, best-effort invocations consume all unreserved concurrency and throttle the critical function. Which Lambda control most directly creates a concurrency bulkhead?
Not quite. Try another option.
Answer: Assign reserved concurrency to the critical function and cap the best-effort function's reserved allocation
Reserved concurrency guarantees capacity for the critical function and can cap the best-effort workload. Provisioned concurrency reduces cold starts but does not by itself provide the required cross-workload isolation.
Question 58 of 60 · Applying Well-Architected principles to serverless architectures · Hard
A Lambda function uses 1 GiB and averages 900 ms per invocation. Testing shows that 2 GiB reduces average duration to 430 ms with the same request count and result. Ignoring free tier and architecture-specific price differences, which configuration has lower duration-based compute usage?
Not quite. Try another option.
Answer: The 2-GiB configuration, because GB-s per invocation
Duration-based usage is allocated memory multiplied by execution time. The tested values are 0.86 GB-s versus 0.90 GB-s, so the larger setting is slightly cheaper and also faster.
Question 59 of 60 · Applying Well-Architected principles to serverless architectures · Hard
A Lambda function needs a rotating database password. The password is currently stored in an encrypted environment variable, but rotations still require function configuration updates. Which design best follows the security pillar?
Not quite. Try another option.
Answer: Store the password in Secrets Manager, grant narrowly scoped access, and use rotation-aware local caching
Secrets Manager centralizes retrieval and rotation, while least-privilege IAM limits access. Rotation-aware caching reduces latency and API calls without embedding the secret in deployment configuration.
Question 60 of 60 · Applying Well-Architected principles to serverless architectures · Hard
A request travels through API Gateway, Lambda, SQS, another Lambda function, and an ECS service. Operators cannot connect failures in the final service to the initiating request. Which observability design best addresses this gap?
Not quite. Try another option.
Answer: Propagate a correlation identifier through messages, emit structured logs, enable tracing, and publish service-level metrics
Correlation identifiers connect asynchronous boundaries where trace continuity may be incomplete. Structured logs, distributed tracing, and service-level metrics together support diagnosis, alerting, and end-to-end operational visibility.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of INT364 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of INT364 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.