Back to Blog

AWS Developer Associate Serverless Guide: Lambda, DynamoDB, and API Gateway for DVA-C02

Master the serverless services tested on the AWS Developer Associate (DVA-C02) exam. Deep dive into Lambda, DynamoDB, API Gateway, Step Functions, and SQS with exam-focused explanations and practice strategies.

By Sailor Team , April 6, 2026

Serverless is the heart of the AWS Certified Developer Associate (DVA-C02) exam. Lambda, DynamoDB, and API Gateway appear in questions across all four domains — development, security, deployment, and troubleshooting. If you master serverless, you’ve covered more than half the exam.

This guide breaks down every serverless concept you need for DVA-C02, organized by service, with the specific details the exam tests.

Why Serverless Dominates the DVA-C02

The DVA-C02 is a developer-focused exam, and AWS’s developer story is built around serverless. Here’s how serverless services map to exam domains:

DomainWeightServerless Coverage
Development with AWS Services32%Lambda, DynamoDB, API Gateway, SQS, SNS, Step Functions
Security26%Lambda execution roles, API Gateway authorizers, Cognito
Deployment24%SAM, Lambda versioning/aliases, API stages
Troubleshooting18%CloudWatch Logs, X-Ray tracing, Lambda metrics

Serverless concepts touch every domain. This is why candidates who understand serverless deeply tend to pass, while those who treat it as just one topic often struggle.

AWS Lambda: The Most Tested Service

Lambda appears in more DVA-C02 questions than any other service. Here’s what the exam expects you to know.

Lambda Execution Model

Key concepts the exam tests:

  • Handler function — The entry point for your Lambda function. The exam may show handler code and ask you to identify issues.
  • Event object — Contains data from the trigger (S3 event, API Gateway request, SQS message). You need to know the event structure for common triggers.
  • Context object — Provides runtime information like remaining execution time, function name, and memory allocation.
  • Cold starts vs. warm starts — Cold starts occur when Lambda creates a new execution environment. Warm starts reuse existing environments.

Lambda Configuration You Must Know

Memory and timeout:

  • Memory: 128 MB to 10,240 MB (in 1 MB increments)
  • Timeout: Up to 15 minutes
  • CPU scales proportionally with memory
  • Exam tip: If a function needs more CPU, increase memory (not a separate setting)

Environment variables:

  • Key-value pairs available at runtime
  • Can be encrypted with KMS
  • Exam frequently tests encryption of sensitive environment variables

Lambda layers:

  • Reusable code packages shared across functions
  • Up to 5 layers per function
  • Common use: shared libraries, custom runtimes

Concurrency:

  • Reserved concurrency — Guarantees a maximum number of concurrent executions for a function
  • Provisioned concurrency — Pre-initializes execution environments to eliminate cold starts
  • Exam tests: When to use reserved vs. provisioned concurrency

Lambda Invocation Types

This is a high-frequency exam topic:

Synchronous invocation:

  • Caller waits for the response
  • Used by: API Gateway, ALB, Cognito
  • Errors returned directly to caller
  • No built-in retry

Asynchronous invocation:

  • Caller gets immediate acknowledgment
  • Used by: S3, SNS, CloudWatch Events
  • Lambda retries twice on failure
  • Dead letter queue (DLQ) or destination for failed events

Event source mapping:

  • Lambda polls the source for records
  • Used by: SQS, DynamoDB Streams, Kinesis
  • Batch processing with configurable batch size
  • Exam tests: Error handling behavior differs by source type

Lambda Versioning and Aliases

Versions:

  • Immutable snapshots of function code and configuration
  • $LATEST is the only mutable version
  • Each version gets a unique ARN

Aliases:

  • Named pointers to specific versions
  • Can split traffic between two versions (weighted alias)
  • Used for blue/green and canary deployments

Exam scenario: “A developer wants to gradually shift traffic to a new Lambda version. Which approach minimizes risk?” Answer: Use an alias with weighted routing to shift a small percentage of traffic to the new version.

Lambda with Other Services

Lambda + S3:

  • S3 event notifications trigger Lambda
  • Know event structure: bucket name, object key, event type
  • Exam tests: configuring S3 event notifications and processing patterns

Lambda + SQS:

  • Event source mapping polls SQS
  • Batch size: 1-10 (standard), 1-10,000 (FIFO)
  • Failed messages return to queue (visibility timeout)
  • DLQ on the SQS queue (not Lambda) for SQS triggers

Lambda + DynamoDB Streams:

  • Event source mapping reads stream records
  • Processes records in order within each shard
  • Failed records block the shard until resolved or expired
  • Bisect batch on error to isolate problematic records

DynamoDB: The Database You Must Master

DynamoDB is the second most tested service on DVA-C02. The exam goes deep on data modeling and operations.

Key Concepts

Primary key types:

  • Partition key only — Simple primary key; must be unique
  • Partition key + sort key — Composite primary key; combination must be unique

Exam tip: Choosing the right partition key is critical. A good partition key distributes data evenly across partitions. The exam tests this concept frequently.

Secondary Indexes

Global Secondary Index (GSI):

  • Different partition key and optional sort key from base table
  • Has its own provisioned throughput
  • Eventually consistent reads only
  • Can be created after table creation
  • Supports projection of selected attributes

Local Secondary Index (LSI):

  • Same partition key as base table, different sort key
  • Shares throughput with base table
  • Supports strongly consistent reads
  • Must be created at table creation time
  • Limited to 10 GB per partition key value

Exam scenario: “A developer needs to query items by a non-key attribute with strongly consistent reads. Which index type should they use?” Answer: LSI — it’s the only index type supporting strongly consistent reads.

Read/Write Capacity

On-demand mode:

  • Pay per request
  • No capacity planning required
  • Best for unpredictable workloads
  • Scales instantly

Provisioned mode:

  • Set read capacity units (RCU) and write capacity units (WCU)
  • Can use Auto Scaling
  • More cost-effective for predictable workloads

Capacity calculations (frequently tested):

  • 1 RCU = 1 strongly consistent read of up to 4 KB/second
  • 1 RCU = 2 eventually consistent reads of up to 4 KB/second
  • 1 WCU = 1 write of up to 1 KB/second

Example: To read 10 items per second, each 8 KB, with strongly consistent reads:

  • Each item needs 2 RCU (8 KB / 4 KB = 2)
  • Total: 10 x 2 = 20 RCU

DynamoDB Operations

Query vs. Scan:

  • Query — Retrieves items by primary key (efficient, reads only matching items)
  • Scan — Reads every item in the table (expensive, use sparingly)
  • Exam tests: When to use Query vs. Scan, and how to optimize Scans with parallel scan

Batch operations:

  • BatchGetItem — Read up to 100 items across tables
  • BatchWriteItem — Write/delete up to 25 items across tables
  • Unprocessed items returned in response (must retry)

Conditional writes:

  • Use ConditionExpression to write only if conditions are met
  • Prevents overwriting data in concurrent scenarios
  • Exam tests: Optimistic locking with version numbers

DynamoDB Streams

  • Captures item-level changes (INSERT, MODIFY, REMOVE)
  • Records available for 24 hours
  • Common pattern: Lambda processes stream records for real-time reactions
  • Four stream view types: KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES

API Gateway: The Front Door

API Gateway connects clients to your backend services. The exam tests configuration, security, and deployment patterns.

API Types

REST API:

  • Full-featured API management
  • Request/response transformation
  • API keys and usage plans
  • Caching support
  • More expensive

HTTP API:

  • Simplified, lower-latency alternative
  • Lower cost (up to 71% cheaper)
  • Supports JWT authorizers natively
  • Limited features compared to REST API

Exam tip: Know when the question requires REST API features (caching, request transformation, API keys) vs. when HTTP API is sufficient.

Integration Types

Lambda proxy integration:

  • Most common pattern
  • API Gateway passes the entire request to Lambda
  • Lambda returns a specific response format
  • Minimal configuration required

Lambda custom integration:

  • API Gateway transforms request before passing to Lambda
  • Mapping templates transform request/response
  • More control but more configuration

Exam scenario: “A developer needs to transform the API response format before returning it to the client. Which integration type supports this?” Answer: Lambda custom integration with response mapping templates.

API Gateway Security

Authorization methods (high-frequency topic):

MethodUse Case
IAM authorizationAWS users/roles calling the API
Cognito authorizerApp users with Cognito user pools
Lambda authorizerCustom auth logic (JWT, OAuth, SAML)
API keysThrottling and usage tracking (NOT security)

Critical exam point: API keys are for usage plans and throttling, not for authentication or authorization. This is a common trap in exam questions.

Stages and Deployment

  • Stages represent different environments (dev, staging, prod)
  • Stage variables are key-value pairs accessible in integrations
  • Canary deployments route a percentage of traffic to a new deployment
  • Changes must be deployed to a stage to take effect

Step Functions: Serverless Orchestration

Step Functions coordinate multiple Lambda functions and AWS services into workflows.

Key Concepts for the Exam

Standard workflows:

  • Long-running (up to 1 year)
  • Exactly-once execution
  • Higher cost per state transition
  • Use for: Order processing, ETL pipelines

Express workflows:

  • Short-duration (up to 5 minutes)
  • At-least-once execution
  • Lower cost, higher throughput
  • Use for: IoT data processing, streaming transforms

State types you should know:

  • Task — Performs work (Lambda, SDK calls)
  • Choice — Branching logic
  • Parallel — Concurrent execution
  • Wait — Delay execution
  • Map — Iterate over items

Error Handling

  • Retry — Automatically retry failed states with configurable backoff
  • Catch — Route failures to a fallback state
  • Exam tests: Configuring retry policies with IntervalSeconds, MaxAttempts, BackoffRate

SQS and SNS: Messaging Patterns

SQS (Simple Queue Service)

Standard queue:

  • At-least-once delivery
  • Best-effort ordering
  • Nearly unlimited throughput

FIFO queue:

  • Exactly-once processing
  • Strict ordering within message groups
  • 3,000 messages/second with batching

Key exam concepts:

  • Visibility timeout — How long a message is hidden after being read (default 30 seconds)
  • Dead letter queue — Receives messages that fail processing after N attempts
  • Long polling — Reduces empty responses and cost (set WaitTimeSeconds > 0)
  • Message deduplication — FIFO queues use deduplication IDs

SNS (Simple Notification Service)

  • Pub/sub messaging pattern
  • Fan-out to multiple subscribers (SQS, Lambda, HTTP, email)
  • SNS + SQS fan-out is a frequently tested pattern
  • Message filtering policies reduce unnecessary processing

Serverless Debugging and Monitoring

CloudWatch for Serverless

Lambda metrics to know:

  • Invocations — Number of function calls
  • Duration — Execution time
  • Errors — Failed invocations
  • Throttles — Invocations rejected due to concurrency limits
  • ConcurrentExecutions — Active execution environments
  • IteratorAge — Age of last record processed (stream-based triggers)

Exam tip: If IteratorAge is increasing, your function can’t keep up with the stream. Solution: increase batch size, increase function memory, or add more shards.

X-Ray for Distributed Tracing

  • Traces requests across Lambda, API Gateway, DynamoDB, SQS
  • Active tracing must be enabled on Lambda and API Gateway
  • Segments represent individual services
  • Subsegments represent calls within a service (SDK calls, HTTP requests)
  • Annotations are indexed key-value pairs for filtering traces
  • Metadata is non-indexed data attached to segments

Exam scenario: “A developer needs to search X-Ray traces where a specific user ID caused errors. What should they use?” Answer: Annotations — they’re indexed and searchable, unlike metadata.

Practice Strategy for Serverless Questions

Serverless questions make up a large portion of the DVA-C02. Here’s how to prepare effectively:

  1. Build a complete serverless application — API Gateway + Lambda + DynamoDB with authentication via Cognito
  2. Practice DynamoDB data modeling — Create tables, GSIs, and run queries
  3. Implement error handling — Configure DLQs, retry policies, and X-Ray tracing
  4. Deploy with SAM — Use SAM templates to define and deploy serverless resources
  5. Take domain-specific practice exams — Focus on questions that test serverless scenarios

Our DVA-C02 mock exam bundle includes heavy coverage of serverless scenarios across all four exam domains. Each question comes with detailed explanations that break down why the correct answer works and why alternatives don’t — exactly the deep understanding you need for exam day.

Key Takeaways

  • Lambda, DynamoDB, and API Gateway appear across all four exam domains
  • Know Lambda’s three invocation types and their error handling behavior
  • Master DynamoDB key design, indexes, and capacity calculations
  • Understand API Gateway integration types and authorization methods
  • API keys are NOT for security — this is a common exam trap
  • Use X-Ray annotations (not metadata) for searchable trace filtering
  • Serverless debugging relies on CloudWatch metrics and X-Ray traces

Nail serverless, and you’ve tackled the majority of the DVA-C02. Combine this knowledge with hands-on practice and realistic mock exams, and you’ll be well-prepared for exam day.

Limited Time Offer: Get 80% off all Mock Exam Bundles | Sale ends in 7 days. Start learning today.

Claim Now