Skip to main content

AWS DVA-C02 Drill: Serverless Logging - Simplifying Distributed Log Search

Jeff Taakey
Author
Jeff Taakey
21+ Year Enterprise Architect | AWS SAA/SAP & Multi-Cloud Expert.

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 knowing how to centralize and efficiently query logs across multiple serverless components without building heavy custom pipelines or unnecessary services. In production, this is about knowing exactly which AWS native services provide the simplest integration for API Gateway, Lambda, and Route 53 logs with minimal setup and immediate search capabilities. Let’s drill down.

The Certification Drill (Simulated Question)
#

Scenario
#

SoftForge Technologies is building a fully serverless e-commerce backend using Amazon API Gateway for REST endpoints, AWS Lambda for business logic, and Amazon Route 53 for DNS management with health checks. During end-to-end testing, developers encounter intermittent errors but cannot immediately pinpoint the root cause due to the distributed nature of the application. To troubleshoot effectively, they need to aggregate and search all application logs easily and quickly.

The Requirement:
#

Identify the approach that allows the development team to collect and search all relevant logs across API Gateway, Lambda, and Route 53 with the least operational overhead and complexity.

The Options
#

  • A) Create Route 53 health checks to monitor endpoint availability. Use Amazon CloudWatch PutMetricData API calls from the application to send log events to CloudWatch. Query logs using Amazon Athena.

  • B) Set up Route 53 health checks. Enable AWS CloudTrail for all services used by the application, send those logs to an S3 bucket, and query logs directly from S3 using Amazon Athena.

  • C) Configure each service (API Gateway, Lambda, Route 53) to stream logs in real time through Amazon Kinesis Data Firehose to an S3 bucket. Use Amazon OpenSearch Service to index and analyze the logs.

  • D) Establish Route 53 health checks for availability monitoring. Enable CloudWatch Logs for API Gateway stages with JSON format logging. Use CloudWatch Logs Insights to search and analyze logs generated by the AWS services.


Google adsense
#

leave a comment:

Correct Answer
#

D

Quick Insight: The Developer Imperative
#

For AWS developers, the key is leveraging CloudWatch Logs Insights because it natively integrates with API Gateway and Lambda logs without extra infrastructure. This gives real-time search capabilities and drastically reduces operational overhead compared to building or maintaining custom ingestion or query pipelines.

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 D

The Winning Logic
#

Option D is the best choice because:

  • API Gateway: Supports detailed access logging directly to CloudWatch Logs with a JSON structured format, facilitating rich queries.
  • Lambda Functions: Log natively to CloudWatch Logs by default, enabling aggregation per function.
  • Route 53 Health Checks: Provide health status metrics visible in CloudWatch, useful alongside logs.
  • CloudWatch Logs Insights: Provides built-in, fast, ad-hoc query language for logs without needing to build data lakes or indexes.
  • Minimal operational overhead because no additional streaming services or data pipelines are required.
  • Native AWS integration ensures low latency and high reliability in log search.

The Trap (Distractor Analysis):
#

  • Why not A?
    Using CloudWatch PutMetricData to manually send logs is cumbersome, as metrics aren’t designed to handle full log messages. Also, querying log details isn’t straightforward with metrics alone.

  • Why not B?
    CloudTrail logs are more oriented towards API calls and audit trails, not granular application logs. Also, enabling CloudTrail for all services and querying via Athena introduces complexity and latency, plus it does not collect Lambda or API request logs.

  • Why not C?
    While streaming logs to Kinesis Data Firehose and indexing into OpenSearch allows powerful search, it creates additional operational overhead managing Firehose and OpenSearch clusters, which is not minimal.


The Technical Blueprint
#

AWS CLI Example to Enable API Gateway Execution Logging to CloudWatch Logs
#

aws apigateway update-stage \
  --rest-api-id a1b2c3d4 \
  --stage-name prod \
  --patch-operations op=replace,path=/accessLogSettings/destinationArn,value=arn:aws:logs:region:account-id:log-group:/aws/api-gateway/prod \
  op=replace,path=/accessLogSettings/format,value='{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","caller":"$context.identity.caller","user":"$context.identity.user","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol"}'

The Comparative Analysis
#

Option API Complexity Performance Use Case
A High - manual metric API Limited metrics Not suited for detailed logs
B Moderate - CloudTrail Latency in logs Audit-focused, not application logs
C High - manages Firehose + OpenSearch Good but more delay and complex High-scale log analysis, but operationally heavy
D Low - native CloudWatch Real-time Best for aggregated serverless app logs search

Real-World Application (Practitioner Insight)
#

Exam Rule
#

For the exam, always pick CloudWatch Logs and CloudWatch Logs Insights when you see “search application logs” and serverless components like API Gateway and Lambda.

Real World
#

In production, teams might use OpenSearch or third-party tools like Datadog for advanced analytics or retention, but for least overhead and quick troubleshooting, CloudWatch Logs Insights is the default go-to.


(CTA) Stop Guessing, Start Mastering
#


Disclaimer

This is a study note based on simulated scenarios for the AWS DVA-C02 exam.

The DevPro Network: Mission and Founder

A 21-Year Tech Leadership Journey

Jeff Taakey has driven complex systems for over two decades, serving in pivotal roles as an Architect, Technical Director, and startup Co-founder/CTO.

He holds both an MBA degree and a Computer Science Master's degree from an English-speaking university in Hong Kong. His expertise is further backed by multiple international certifications including TOGAF, PMP, ITIL, and AWS SAA.

His experience spans diverse sectors and includes leading large, multidisciplinary teams (up to 86 people). He has also served as a Development Team Lead while cooperating with global teams spanning North America, Europe, and Asia-Pacific. He has spearheaded the design of an industry cloud platform. This work was often conducted within global Fortune 500 environments like IBM, Citi and Panasonic.

Following a recent Master’s degree from an English-speaking university in Hong Kong, he launched this platform to share advanced, practical technical knowledge with the global developer community.


About This Site: AWS.CertDevPro.com


AWS.CertDevPro.com focuses exclusively on mastering the Amazon Web Services ecosystem. We transform raw practice questions into strategic Decision Matrices. Led by Jeff Taakey (MBA & 21-year veteran of IBM/Citi), we provide the exclusive SAA and SAP Master Packs designed to move your cloud expertise from certification-ready to project-ready.