AWSAWS SAA-C03

AWS Lambda and Serverless Architecture Explained for AWS SAA-C03

The question is not whether you can manage servers. It is whether you should. Lambda lets you write a function, define what event triggers it, and hand AWS the problem of provisioning, scaling, patching, and operating the underlying compute. You pay only for the actual execution time, measured in milliseconds. For workloads that run infrequently or unpredictably, this can cut costs dramatically compared to keeping instances running around the clock. The SAA-C03 exam focuses on Lambda triggers, invocation types, execution limits, cold starts, and how Lambda integrates with API Gateway, SQS, DynamoDB Streams, and other services to build event-driven architectures.

8 min
3 sections · 8 exam key points

How Lambda works

A Lambda function is code that runs in response to an event. The event could be an HTTP request through API Gateway, a file uploaded to S3, a message arriving in an SQS queue, a record appearing in a DynamoDB stream, or a scheduled time via EventBridge. When the event fires, Lambda provisions a runtime environment, loads your function, executes it, and tears down the environment when done.

Lambda functions have hard limits you need to know. Maximum execution timeout is 15 minutes. If your function needs to run longer, Lambda is the wrong tool: use EC2, ECS, or Batch instead. Memory allocation ranges from 128 MB to 10 GB. CPU scales proportionally with memory, so allocating more memory also gives you more CPU. Maximum package size is 50 MB compressed, or 250 MB uncompressed. For larger dependencies, Lambda Layers let you separate large libraries from your function code and share them across functions.

Invocation types matter for the exam. Synchronous invocation means the caller waits for the function to return a result: API Gateway always invokes Lambda synchronously. Asynchronous invocation means Lambda queues the event and returns immediately: S3 event notifications trigger Lambda asynchronously. Event source mapping is how Lambda polls services like SQS, Kinesis, and DynamoDB Streams and invokes functions in batches.

Cold starts, concurrency, and serverless patterns

Cold starts are the latency cost of spinning up a new Lambda execution environment. When no warm environment is available, Lambda has to initialize the runtime, load your code, and run your initialization code before handling the actual request. For Python or Node.js functions, this might add 100-500 ms. For Java or .NET functions with large frameworks, cold starts can exceed a second. Provisioned Concurrency solves this by keeping a specified number of environments initialized and ready, eliminating cold starts for that concurrency level at an additional cost.

Concurrency is the number of function instances running simultaneously. By default, Lambda scales to match incoming requests automatically, up to the regional account limit. Reserved Concurrency sets a maximum for a specific function, preventing it from consuming all available concurrency and starving other functions. It also guarantees that concurrency is always available for that function.

Step Functions orchestrates multiple Lambda functions into workflows. Instead of chaining functions by having one function call another directly, Step Functions uses a state machine to define the sequence, handle errors, add wait states, and execute branches in parallel. This keeps Lambda functions simple and single-purpose while the workflow logic lives in the state machine definition.

How to choose the correct answer

Lambda maximum timeout: 15 minutes. If a task takes longer, use EC2, ECS Fargate, or AWS Batch.

Synchronous triggers: API Gateway, Application Load Balancer, Cognito, Lex. The caller waits.

Asynchronous triggers: S3 events, SNS notifications, EventBridge rules. Lambda queues the event.

Event source mapping (Lambda polls): SQS, Kinesis Data Streams, DynamoDB Streams. Batch processing.

Cold start mitigation: Provisioned Concurrency. Cost reduction: Reserved Concurrency caps usage.

Multi-function workflows: Step Functions state machines rather than Lambda calling Lambda directly.

Lambda Layers: shared dependencies across functions. Lambda@Edge: run functions at CloudFront edge locations.

Key exam facts — AWS SAA-C03

  • Lambda maximum execution time is 15 minutes. Longer workloads need EC2, ECS, or Batch.
  • Synchronous invocation: caller waits for response (API Gateway, ALB).
  • Asynchronous invocation: Lambda queues event, caller gets immediate response (S3, SNS).
  • Event source mapping: Lambda polls SQS, Kinesis, DynamoDB Streams and processes in batches.
  • Cold start: initialization latency for new execution environments. Provisioned Concurrency eliminates it.
  • Reserved Concurrency: caps max concurrency for a function, guarantees availability.
  • Step Functions: orchestrate Lambda functions in state machines without direct function-to-function calls.
  • Lambda@Edge: run Lambda functions at CloudFront edge locations for geographically distributed processing.

Common exam traps

Lambda can replace EC2 for any workload because it scales automatically.

Lambda has a hard 15-minute execution limit and is designed for short, event-driven tasks. Long-running batch jobs, applications with stateful processes, or workloads requiring persistent storage on the compute instance need EC2, ECS, or Batch. Lambda scales well but is not appropriate for every compute pattern.

Increasing Lambda memory only helps if the function is memory-constrained.

CPU allocation scales proportionally with memory in Lambda. A CPU-bound function that processes images or runs complex calculations will run faster with more memory allocated, even if it is not using all that memory. If a function is slow due to compute, doubling memory can halve execution time and the total cost may stay similar.

Step Functions is just a way to run Lambda functions in sequence.

Step Functions is a full workflow orchestration service with branching, parallel execution, error handling, retries, and wait states built in. It keeps workflow logic separate from function code, handles failures gracefully, and provides visual workflow monitoring. Using Lambda functions to call each other creates tight coupling and makes error handling complex.

Practice this topic

Test yourself on Lambda & Serverless

JT Exams routes you to questions in your exact weak areas — automatically, after every session.

No credit card · Cancel anytime

Related certification topics