passdrill

Lambda & Serverless

20 cards · AWS SAA-C03 · answer each one, then read the explanation. Your score tallies below. Looking for Lambda concurrency worked example: reserved vs provisioned vs unreserved, one traffic burst traced? Read the explainer.

0 / 20 answered · 0 correct

AWS SAA-C03 · Lambda & Serverless · Card 001/020 medium

A team sets a Lambda function's reserved concurrency to 5 to cap its cost and blast radius. The function is invoked synchronously by an application, and 5 invocations are already executing when a 6th request arrives. What happens to that 6th request?

  1. The request queues automatically and Lambda delivers a response once one of the 5 running executions finishes, with no error surfaced to the caller
  2. The request overflows and reuses spare concurrency capacity borrowed from other functions' reserved pools in the same account
  3. The request is throttled immediately and the caller receives a throttling error, because reserved concurrency also acts as a hard ceiling on the function's concurrent executions
  4. Lambda automatically and temporarily raises the account's unreserved concurrency pool to absorb the extra request
AWS SAA-C03 · Lambda & Serverless · Card 002/020 easy

An API backed by a Lambda function sees occasional latency spikes on the first request after a period of low traffic, because a new execution environment must initialize the runtime and the function's code before it can process the request. Which configuration change removes this latency for a set number of requests, without changing the application code?

  1. Enable provisioned concurrency on the function's version or alias, so a chosen number of execution environments are initialized in advance and kept warm at all times
  2. Increase the function's reserved concurrency limit so more concurrent invocations are permitted
  3. Increase the function's configured memory so each invocation finishes faster
  4. Switch the function's deployment package type from a .zip archive to a container image
AWS SAA-C03 · Lambda & Serverless · Card 003/020 hard

A Lambda function is configured as an SQS event source mapping with a batch size of 10, and the function has not enabled batch item failure reporting. During one invocation, the function successfully processes 8 of the 10 messages in the batch, then throws an unhandled exception while handling the 9th message (the 10th is never attempted). What happens to the batch's messages as a result?

  1. Only the 9th and 10th messages (the unprocessed ones) become visible again in the queue; the 8 already-processed messages are deleted immediately
  2. The event source mapping automatically retries only the 9th message using exponential backoff, leaving the rest of the batch alone
  3. SQS immediately moves all 10 messages to a dead-letter queue on this first failure, regardless of the source queue's redrive policy
  4. All 10 messages, including the 8 that were already handled inside the function, become visible again once the queue's visibility timeout expires, so those 8 get delivered and processed again
AWS SAA-C03 · Lambda & Serverless · Card 004/020 medium

An S3 event notification invokes a Lambda function asynchronously. The function's code throws an unhandled exception on every invocation. The function has both an on-failure Destination (an SNS topic) and a legacy dead-letter queue (an SQS queue) configured. Which statement correctly describes when these fire relative to Lambda's built-in asynchronous retry behavior?

  1. The dead-letter queue receives the event immediately after the very first failed attempt, before any retry happens
  2. Lambda retries the invocation according to its configured retry attempts, and only once every retry is exhausted does it send the failed event, along with extra context such as the error details and invocation record, to both the destination and the dead-letter queue
  3. Configuring both an on-failure destination and a dead-letter queue at the same time is invalid; Lambda silently ignores the dead-letter queue whenever a destination is present
  4. The on-failure destination only ever receives a record when the invocation succeeds; failure details are exclusively available in the dead-letter queue
AWS SAA-C03 · Lambda & Serverless · Card 005/020 hard

An engineer recalls older guidance warning that attaching a Lambda function to a VPC caused significant added cold-start latency because a new elastic network interface (ENI) had to be created for every execution environment. They are now deciding whether to attach a new function to a VPC so it can reach an RDS instance in a private subnet. Which statement about Lambda's current VPC networking model is accurate?

  1. Lambda still creates a brand-new ENI for every execution environment on every cold start; the only available mitigation is provisioned concurrency
  2. Attaching a function to a VPC has no effect on its ability to reach the public internet; outbound internet routing works identically whether or not the function is attached to a VPC
  3. Lambda now provisions a shared pool of ENIs per unique VPC/subnet/security-group combination up front, and execution environments reuse them, largely eliminating the old per-invocation ENI-creation delay — though the function still needs a NAT gateway or VPC endpoints for internet or AWS-service access from a private subnet
  4. VPC attachment is only supported for functions packaged as container images, not for functions packaged as .zip archives
AWS SAA-C03 · Lambda & Serverless · Card 006/020 medium

A team is building a Step Functions workflow to process payment transactions. Each payment step is non-idempotent (charging a customer twice would be a real financial error), and the workflow must retain a queryable, auditable execution history for compliance for up to a year. Which workflow type should they choose, and why?

  1. A Standard workflow, because it guarantees exactly-once execution semantics and supports long-running, auditable executions of up to a year — appropriate for non-idempotent actions like charging a payment
  2. An Express workflow, because its at-least-once execution model retries more aggressively, and its five-minute maximum duration is not a concern for a single payment step
  3. A Standard workflow, because it is billed by execution duration and memory consumed rather than by state transitions, which is cheaper for financial workflows
  4. An Express workflow, because it supports the Distributed Map state for large-scale parallel processing, while Standard workflows do not
AWS SAA-C03 · Lambda & Serverless · Card 007/020 easy

A team wants to gradually shift traffic to a new version of a Lambda function for a canary release: 90% of invocations should keep hitting the current stable version and 10% should go to the new version, without the client-facing function ARN ever changing. Which approach achieves this natively in Lambda?

  1. Publish the new code as $LATEST and point clients directly at the $LATEST version
  2. Set reserved concurrency on the new version to roughly 10% of the function's total concurrency
  3. Deploy the new version as an entirely separate Lambda function and split traffic between the two functions using Route 53 weighted routing
  4. Point clients at a Lambda alias, and configure that alias with weighted traffic routing so it splits invocations across the two published versions (for example, 90% and 10%)
AWS SAA-C03 · Lambda & Serverless · Card 008/020 easy

A team wants to share a common set of dependencies across several Lambda functions without repackaging those dependencies into every function's own deployment package, so they plan to publish the shared code as one or more Lambda layers. Which statement about layers is correct?

  1. A function can use an unlimited number of layers, as long as the account's total code-storage quota is not exceeded
  2. A function can use up to 5 layers, and the combined unzipped size of the function's own code plus all attached layers cannot exceed 250 MB
  3. Layers can only contain compiled binaries; interpreted-language libraries, such as Python packages, cannot be distributed as layers
  4. Once a layer version is published and attached to a function, it can be edited in place, and every function referencing it automatically picks up the change
AWS SAA-C03 · Lambda & Serverless · Card 009/020 easy

A team needs the simplest possible way to give a single Lambda function its own HTTPS endpoint for a lightweight webhook, with no need for request/response transformation, custom domains, usage plans, or per-route throttling tiers. Comparing Lambda function URLs to Amazon API Gateway, which statement correctly distinguishes the two?

  1. API Gateway is simpler for this case because it requires no separate resource configuration beyond the Lambda function itself
  2. A function URL supports request/response transformation, custom per-route authorizers, and usage-plan-based API keys, exactly like API Gateway does
  3. A function URL gives a dedicated HTTPS endpoint directly on a single function, configured with just IAM-based or public (NONE) auth and CORS settings, requiring far less setup, while API Gateway adds routing across many backends, request/response transformation, custom domains, usage plans, and finer-grained throttling
  4. A function cannot have both a function URL and an API Gateway integration configured at the same time; the two are mutually exclusive
AWS SAA-C03 · Lambda & Serverless · Card 010/020 easy

A Lambda function subscribed to a DynamoDB Streams event source mapping processes item-level change records to keep a search index in sync. A single table item receives three rapid updates in quick succession. Which statement about the ordering of the resulting stream records is correct?

  1. Within a single shard, DynamoDB Streams delivers event records in the same order the underlying item changes occurred, and since all changes for a given item's partition key are captured by the same shard, the three updates arrive and are processed in order
  2. DynamoDB Streams provides no ordering guarantee at all, even within a single shard, so the three updates could be delivered to the function in any order
  3. Ordering is guaranteed globally across the entire table and across every shard at all times, regardless of how many shards the stream has
  4. Ordering across the three updates is only guaranteed if the event source mapping's batch size is explicitly set to 1 record per invocation
AWS SAA-C03 · Lambda & Serverless · Card 011/020 medium

An SQS event source mapping has batch item failure reporting (ReportBatchItemFailures) enabled for its Lambda function. During one invocation processing a batch of 10 messages, the function successfully processes 8 messages, then throws an unhandled exception while handling the 9th (the 10th is never attempted), without ever returning a batchItemFailures response listing specific message IDs. What happens to the batch's messages as a result?

  1. Enabling ReportBatchItemFailures automatically marks the two messages the function never confirmed processing as failed even without an explicit response, so only messages 9 and 10 are redelivered while the 8 already-processed messages are deleted immediately
  2. Because the function threw an unhandled exception instead of returning a response that lists specific failed message IDs, Lambda treats the whole batch as a complete failure regardless of the ReportBatchItemFailures setting, so all 10 messages, including the 8 the function had already finished, become visible again once the visibility timeout expires
  3. ReportBatchItemFailures changes the visibility timeout mechanism itself, so the 8 successfully processed messages are held invisible indefinitely until manually deleted, while messages 9 and 10 are redelivered immediately
  4. SQS moves the entire batch to a dead-letter queue immediately upon detecting the exception, without waiting for the visibility timeout or checking the source queue's redrive policy
AWS SAA-C03 · Lambda & Serverless · Card 012/020 hard

A Lambda function has no reserved concurrency configured, and the account's overall concurrency limit is comfortably above what the function needs. Traffic to the function suddenly jumps from near zero to a sustained 5,000 concurrent invocations in under 2 seconds. Given Lambda's per-function concurrency scaling behavior, what is the most accurate expectation for the first few seconds of this spike?

  1. Lambda instantly provisions all 5,000 execution environments within the first second, since account-level concurrency, not any per-function scaling rate, is the only limiting factor
  2. Because reserved concurrency isn't configured, the function is hard-capped at exactly 1,000 concurrent executions no matter how much unreserved account concurrency is available
  3. Lambda scales the function in one large step every 60 seconds, so requests queue for up to a minute before any scaling occurs
  4. Lambda scales this function's execution environments at a fixed per-function rate of up to 1,000 additional execution environments every 10 seconds, so some invocations beyond that rate are throttled in the first few seconds even though the account has unused concurrency headroom, until the function's concurrency catches up with demand
AWS SAA-C03 · Lambda & Serverless · Card 013/020 easy

An S3 bucket is configured with an event notification that invokes a Lambda function whenever a new object is uploaded, and the function's code needs to read that uploaded object from S3 to process it. After deployment, S3 uploads never trigger the function at all, even though the function's execution role already has an IAM policy granting s3:GetObject on the bucket. What is the most likely cause?

  1. The function is missing a resource-based policy statement granting the S3 service principal permission to invoke the function (lambda:InvokeFunction); the execution role only governs what the function's code can access once it does run, not who is allowed to invoke it
  2. The execution role's s3:GetObject permission is unrelated to Lambda invocation, but adding an s3:InvokeFunction action to that same execution role would have fixed the problem instead
  3. S3 event notifications can only invoke Lambda functions that have no execution role attached at all, so removing the role entirely would resolve the issue
  4. Lambda functions triggered by S3 must have reserved concurrency configured before S3 is permitted to invoke them, and that configuration is what's missing here
AWS SAA-C03 · Lambda & Serverless · Card 014/020 medium

A team wants to run custom code at CloudFront edge locations to modify an origin request before it is sent to the origin server, including making an outbound network call to a third-party API to enrich the request with additional data. Which statement correctly evaluates whether CloudFront Functions or Lambda@Edge fits this requirement?

  1. CloudFront Functions fits perfectly, since CloudFront Functions can run on the origin-request event and its JavaScript runtime includes full network access for outbound calls to third-party APIs
  2. Neither service can modify an origin request; only the viewer-request and viewer-response events can be customized anywhere at the CloudFront edge
  3. Lambda@Edge is required here, because CloudFront Functions only supports the viewer-request and viewer-response events (not origin-request or origin-response) and has no network access at all, while Lambda@Edge supports all four event types and does allow outbound network calls
  4. CloudFront Functions is required here because it is the only one of the two that supports the origin-request event; Lambda@Edge is limited to the viewer-request and viewer-response events only
AWS SAA-C03 · Lambda & Serverless · Card 015/020 easy

In an AWS Step Functions state machine defined with the Amazon States Language, a Task state calls a downstream API that occasionally throws a transient error. The team wants the state to automatically retry that specific named error a few times with an increasing delay between attempts, and only if every retry attempt is exhausted should the workflow move to a dedicated cleanup state instead of failing outright. Which state machine construct(s) achieve this?

  1. A single Catch field configured with the error name and a BackoffRate; the Catch field itself performs the retries before falling back to the cleanup state
  2. A Retry field naming the specific error with a configured MaxAttempts and BackoffRate for exponential delay between attempts, combined with a separate Catch field that only takes effect once the Retry policy's attempts are exhausted, routing execution to the cleanup state
  3. Neither Retry nor Catch can target one specific named error; both apply only to every error the state could ever throw, with no way to scope them to the transient error alone
  4. A Parallel state is required, since Retry and Catch fields only exist on Map states, not on individual Task states
AWS SAA-C03 · Lambda & Serverless · Card 016/020 easy

A team wants a Lambda function to run automatically every night at a fixed time to generate a report, without any component polling for the time or relying on an external cron server. Which approach achieves this natively within AWS?

  1. Configure the Lambda function's own reserved concurrency to 1 and have the function poll an environment variable holding a time-check on every cold start
  2. Use an SQS delay queue, repeating its maximum per-message delay in a loop until the target time of night is reached, then invoke the function
  3. Attach an RDS event subscription to the function so it fires whenever the database's internal clock reaches midnight
  4. Create an Amazon EventBridge rule with a cron or rate schedule expression and configure the Lambda function as its target; EventBridge itself triggers the rule at the scheduled time and invokes the function directly, with no polling needed anywhere
AWS SAA-C03 · Lambda & Serverless · Card 017/020 easy

An order-processing event needs to trigger three independent downstream workflows, an inventory update, a customer notification email, and analytics logging, each implemented as a separate Lambda function that should be able to process the event at its own pace without one workflow's failure or slowdown affecting the others. Which architecture achieves this?

  1. Publish the order event once to an SNS topic with three SQS queues subscribed as fan-out targets, each queue feeding its own Lambda function through an event source mapping; each queue buffers and retries independently, so one workflow's failures or delays don't block or lose events for the others
  2. Invoke all three Lambda functions synchronously in a single chained call from the order service, so each function runs one after another within the same request
  3. Publish the event directly to a single SQS queue, then have each of the three Lambda functions poll and consume messages from that same shared queue so all three always process every event
  4. Configure a single Lambda function with three separate reserved concurrency pools, one for each downstream responsibility
AWS SAA-C03 · Lambda & Serverless · Card 018/020 easy

A team is building a video-transcoding workload that processes jobs ranging from a few minutes to several hours of runtime each, with predictable, steady throughput most of the day and a need for direct control over the container's CPU and memory allocation. Which compute choice fits best, and why?

  1. AWS Lambda, because its per-invocation timeout can be extended indefinitely for workloads with predictable, steady runtime
  2. AWS Lambda, because Lambda functions are billed identically to Fargate tasks for long-running work, so there is no cost reason to prefer one over the other
  3. AWS Fargate, because it runs containers without the fixed per-invocation duration ceiling that Lambda has, and it exposes direct, explicit control over the task's CPU and memory allocation, a better fit for long, steady-state, resource-tunable container workloads than a short-lived, event-driven function
  4. AWS Fargate, because it automatically decomposes any workload into 15-minute segments internally, so Lambda's timeout limitation never actually applies to Fargate-hosted code
AWS SAA-C03 · Lambda & Serverless · Card 019/020 medium

A nightly Lambda function processes an ever-growing batch of records and now occasionally approaches its function timeout before finishing, prompting repeated requests to raise the timeout further. Lambda's per-invocation timeout is a fixed quota with a documented maximum for standard invocations. Which redesign fits AWS's recommended approach for a job that could keep growing past that ceiling?

  1. Split the workload across multiple concurrent executions of the same function, each configured with a custom per-invocation timeout that exceeds the account's documented maximum
  2. Break the job into smaller units of work orchestrated by an AWS Step Functions state machine, or hand the processing to a compute option without Lambda's fixed per-invocation ceiling, so no single invocation needs to run longer than the documented maximum regardless of how large the overall job grows
  3. Request a Lambda function timeout quota increase from AWS Support, since the per-invocation timeout is a soft, requestable limit like account concurrency and can be raised without bound for a single invocation
  4. Enable provisioned concurrency on the function, since pre-initializing execution environments removes the per-invocation timeout ceiling entirely
AWS SAA-C03 · Lambda & Serverless · Card 020/020 hard

A team stores a handful of Lambda environment variables, including one holding a third-party API key, and assumes that because Lambda encrypts environment variables at rest by default, an IAM principal with read access to the function's configuration cannot see the API key's plaintext value anywhere. Which statement corrects this assumption?

  1. Lambda cannot encrypt environment variables at all without the team first explicitly enabling a customer managed KMS key, so the API key is already stored as plaintext today
  2. The assumption is entirely correct: default at-rest encryption alone guarantees the plaintext value is never displayed to any principal with read access to the function
  3. Default at-rest encryption only applies to environment variables whose name contains the word KEY or SECRET; the API key variable specifically needs a customer managed KMS key before it is encrypted at all
  4. Default at-rest encryption keeps the value encrypted in storage, but a principal with permission to view the function's configuration, through the console or the GetFunctionConfiguration API, can still see the decrypted plaintext value there; for a secret that must stay hidden even from such principals, the team should use a dedicated service like AWS Secrets Manager rather than relying on environment variable encryption alone