CloudGuild · Blog · Cheat sheets · Lessons · Certifications

AWS Lambda — Serverless Functions: When to Use What (and How the Exam Tests It)

Explore when to choose AWS Lambda for serverless functions and how the SAA-C03 exam tests your knowledge on this decision.

AWS Lambda provides event-driven functions that AWS manages and scales. You don’t have to worry about servers. You only pay for what runs. This makes it an attractive option for many use cases.

When to Choose AWS Lambda

  1. Event-Driven Workflows
    AWS Lambda shines when integrating with event sources. Use it for:

    • S3 uploads
    • DynamoDB streams
    • API Gateway
    • EventBridge
  2. Spiky or Unpredictable Loads
    If your workload spikes, Lambda is a good choice. You avoid paying for idle EC2 instances.

  3. Short Tasks
    Tasks must fit within the 15-minute execution limit. For longer jobs, consider ECS, Fargate, or EC2.

Comparison Table: AWS Lambda vs. EC2/Fargate

Feature AWS Lambda EC2/Fargate
Server Management No Yes
Execution Time Limit 15 minutes No
Cost Model Pay-per-use Pay for instance hours
Ideal for Short, event-driven Long-running tasks

Key Architectural Decisions

Gotchas & Exam Traps

How the Exam Tests This

  1. Scenario-Based Questions
    Expect questions that present a scenario requiring event-driven architecture. Identify if Lambda is the right fit based on workload characteristics.

  2. Concurrency Management
    Questions may focus on reserved vs. provisioned concurrency. Knowing when to apply each is crucial for performance-related questions.

  3. Cold Start Considerations
    You may face questions on mitigating cold starts. Understand the implications of using provisioned concurrency versus standard invocation.

The Rule to Remember

AWS Lambda is best for short, event-driven tasks. Use it for integration and processing, but switch to containers for longer, specialized workloads.

Take the free SAA-C03 mock exam

Take a free mock exam →