AWS Certified SysOps Administrator – AssociateMonitoring, Logging, and RemediationMedium
A company uses a serverless application consisting of Amazon API Gateway, AWS Lambda functions, and Amazon DynamoDB. They are experiencing performance issues and errors, but the logs in CloudWatch Logs are fragmented across multiple Lambda functions, making it difficult to trace the full request flow. They need a solution to visualize the end-to-end request path and identify bottlenecks or errors across these services.
- AEnable CloudWatch Logs Insights to query logs from all Lambda functions simultaneously.
- BImplement AWS X-Ray across API Gateway, Lambda, and DynamoDB to trace requests.
- CConfigure Amazon EventBridge to capture Lambda invocation events and send them to an Amazon SQS queue for analysis.
- DUse Amazon Kinesis Firehose to centralize all Lambda logs into an Amazon S3 data lake for analysis using Amazon Athena.
Show answer & explanationAnswer & explanation
Correct answer: B. Implement AWS X-Ray across API Gateway, Lambda, and DynamoDB to trace requests.
AWS X-Ray is purpose-built for distributed tracing in serverless and microservices architectures. By instrumenting API Gateway, Lambda, and DynamoDB, X-Ray can provide a visual service map and detailed trace timelines, allowing the administrator to easily visualize the end-to-end request flow and pinpoint performance bottlenecks or errors.
Why the other options are wrong
- A. CloudWatch Logs Insights helps query fragmented logs but doesn't provide an end-to-end trace visualization or service map across different services.
- C. EventBridge and SQS can capture and queue events, but this doesn't provide the distributed tracing and visualization needed to identify bottlenecks across service calls.
- D. Centralizing logs in S3 for Athena analysis is good for large-scale log archiving and querying, but it doesn't offer the real-time end-to-end trace visualization that X-Ray provides.
AWS X-Ray for Serverless Tracing
AWS X-Ray provides end-to-end distributed tracing for serverless applications, allowing visualization of requests through services like API Gateway, Lambda, and DynamoDB, to identify performance issues and errors.
- Generates a service map to visualize application components.
- Shows detailed trace timelines for individual requests.
- Helps pinpoint latency and error sources in serverless workflows.
- Integrates with popular serverless services automatically or with minimal configuration.
Memory trick: X-Ray follows the serverless flow, where errors and slowness show.