← All AWS Flashcard Decks

Serverless and Lambda Architecture Flashcards

7 cards from real AWS practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Serverless and Lambda Architecture flashcards as text
  1. A Lambda function needs to process messages from an SQS queue but should stop consuming messages when downstream DynamoDB write capacity is exhausted. What is the most operationally efficient approach?

    Answer: Configure a Lambda event source mapping with a maximum concurrency limit tied to a CloudWatch alarm that disables the trigger

    Event source mapping maximum concurrency limits how many concurrent Lambda instances process the queue, and a CloudWatch alarm on DynamoDB throttling can disable the ESM trigger to back off.

  2. Which Lambda invocation model does Amazon API Gateway use by default when a client makes an HTTP request?

    Answer: Synchronous (RequestResponse)

    API Gateway invokes Lambda synchronously so it can return the function's response directly to the HTTP client.

  3. A company wants Lambda functions to access an RDS PostgreSQL database without embedding credentials in environment variables. Which solution follows AWS best practices?

    Answer: Use RDS Proxy with IAM database authentication and grant the Lambda execution role the rds-db:connect permission

    RDS Proxy with IAM authentication lets Lambda authenticate using its IAM role, eliminating stored passwords and also pooling database connections.

  4. What happens to a Lambda function's in-memory state (global variables) between invocations when the same execution environment is reused?

    Answer: Global variables persist across invocations within the same execution environment

    Lambda may reuse execution environments across invocations, meaning global variables and database connections initialized outside the handler persist for the lifetime of the environment.

  5. A serverless application uses Step Functions Standard Workflows. Executions occasionally exceed 1 year in duration. What should the architect recommend?

    Answer: Break the workflow into chained executions where each child workflow restarts before the parent's 1-year limit

    Standard Workflows have a maximum execution duration of 1 year; for longer processes, chaining executions (where one execution triggers a new one) is the standard pattern.

  6. Which AWS service allows you to run containerized workloads in a serverless manner without managing clusters or EC2 instances?

    Answer: AWS Fargate

    AWS Fargate is a serverless compute engine for containers that removes the need to provision or manage underlying EC2 instances.

  7. A Lambda function is configured with a 512 MB memory allocation and consistently completes in 800 ms. After increasing memory to 1024 MB, it completes in 300 ms. What is the cost impact?

    Answer: Cost decreases because the price per GB-second stays constant but duration dropped by more than 50%

    Lambda billing is GB-seconds (memory × duration): 0.5 GB × 0.8 s = 0.4 GB-s vs 1.0 GB × 0.3 s = 0.3 GB-s, so the higher memory allocation is actually cheaper.