Jeff’s Note #
Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.
For AWS DVA-C02 candidates, the confusion often lies in how to design event-driven data flows with minimal code changes and maximum scalability. In production, this is about knowing exactly which AWS services naturally integrate to capture changes without reinventing the wheel or introducing unnecessary overhead. Let’s drill down.
The Certification Drill (Simulated Question) #
Scenario #
TechTaste Eats is a rapidly growing meal delivery startup that exposes an Amazon API Gateway HTTP API to receive meal orders from multiple restaurant partners. This API triggers an AWS Lambda function responsible for validating and storing each order in an Amazon DynamoDB table. As new restaurant partners are onboarded, some require additional Lambda functions to receive and process orders asynchronously.
Recently, TechTaste Eats created an Amazon S3 bucket to archive all order records and their updates for future business intelligence and analytics. The development team wants to ensure that all orders and any subsequent updates to those orders are reliably stored into the S3 bucket with the least amount of custom code and maintenance overhead.
The Requirement: #
How should TechTaste’s lead developer architect this solution to ensure all order data and updates are stored in the S3 bucket with minimal development effort?
The Options #
-
A) Create a new Lambda function and a new API Gateway endpoint. Configure this Lambda function to write directly to the S3 bucket. Modify the original Lambda to send order updates to this new API Gateway endpoint.
-
B) Use Amazon Kinesis Data Streams by creating a new data stream. Update the existing Lambda function to publish orders into this stream. Configure a Kinesis Data Firehose delivery stream to persist data into the S3 bucket.
-
C) Enable DynamoDB Streams on the orders table. Create a new Lambda function triggered by this stream. Configure this Lambda to write streamed order records and updates to the S3 bucket as they happen.
-
D) Modify the current Lambda function to publish order data to an Amazon SNS topic. Subscribe a dedicated Lambda function to that SNS topic, which writes the messages to the S3 bucket on receipt.
Google adsense #
leave a comment:
Correct Answer #
C
Quick Insight: The Developer Imperative #
For a Lead Developer, the key is leveraging native event integrations (DynamoDB Streams + Lambda) to offload replication logic from your main application code. This approach requires zero changes to the existing API or Lambda invocation patterns, minimizing development and testing overhead.
Content Locked: The Expert Analysis #
You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?
The Expert’s Analysis #
Correct Answer #
Option C
The Winning Logic #
DynamoDB Streams automatically capture every insert, update, and delete made to the table. By enabling streaming on the orders table, TechTaste can trigger a Lambda function in real-time whenever a change occurs, decoupling the archival logic from the core ordering Lambda. This design drastically minimizes development effort because:
- No modification required to the existing Lambda function that handles API requests.
- Near real-time replication of all order changes, including updates.
- Serverless, scalable, and cost-efficient since Lambda only processes streaming events as they occur.
- No need to provision additional API Gateway endpoints or manage message SNS topics.
This pattern exemplifies event-driven architecture best practices and fits perfectly within a developer’s toolset for loosely coupled systems.
The Trap (Distractor Analysis): #
- Why not A? Creating a new API Gateway and Lambda forces synchronous calls and adds complexity to maintain multiple APIs and Lambda functions. The original Lambda must be changed, increasing regression risk.
- Why not B? While Kinesis Data Streams integrate with Firehose, this adds operational overhead (stream provisioning) and requires the existing Lambda to publish to Kinesis, which means code changes and more infrastructure.
- Why not D? Using SNS requires publishing messages and managing the topic and subscriptions. This adds unnecessary complexity and potential delivery retries. Also, the existing Lambda must be modified to publish messages, increasing developer effort.
The Technical Blueprint #
# Enable DynamoDB Streams with NEW_AND_OLD_IMAGES on existing table
aws dynamodb update-table --table-name OrdersTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES
# Create Lambda function with DynamoDB stream trigger using AWS CLI
aws lambda create-event-source-mapping \
--function-name ArchiveOrdersToS3 \
--event-source-arn arn:aws:dynamodb:region:account-id:table/OrdersTable/stream/stream-label \
--starting-position TRIM_HORIZON
The Comparative Analysis #
| Option | API Complexity | Performance | Use Case Fit |
|---|---|---|---|
| A | High | Moderate | Adds synchronous API overhead |
| B | Medium | High | Good for complex streaming but heavier ops |
| C | Low | High | Native event-driven, minimal dev changes |
| D | Medium | Moderate | Adds SNS overhead and Lambda integration |
Real-World Application (Practitioner Insight) #
Exam Rule #
For the exam, always pick DynamoDB Streams + Lambda when you need to react to table changes with minimal disruption to the original application.
Real World #
In production, you might consider Kinesis Data Streams or Firehose if you require complex buffering, transformation pipelines, or integration with multiple downstream consumers. But those add complexity and code changes that this scenario wants to avoid.
(CTA) Stop Guessing, Start Mastering #
Disclaimer
This is a study note based on simulated scenarios for the AWS DVA-C02 exam.