Easy ReviewSAA-C03
Design Resilient Architectures3

X-Ray

Trace requests, control sampling, instrument services, and investigate latency or failures.

X-Ray joins service records into request traces. Instrumentation records the work, propagated context connects it, and sampling decides which requests are recorded.

Traces, segments, and propagation

X-Ray follows recorded requests across a distributed application, meaning an application whose work spans services. A traceThe connected records of service work associated with a request. is the request’s connected record; segmentsA record of a service or resource handling a request. describe service work and subsegmentsA record of a smaller operation inside a segment, such as a downstream call. describe smaller operations within that work.

How it works

  1. For API Gateway REST APIs, a stage can sample incoming requests and add a missing trace header.
  2. Services send segments for their work. Instrumented clients add subsegments for calls to other services or databases.
  3. X-Ray collects segments associated with a request. For a dependency such as DynamoDB, it creates an inferred nodeA dependency that X-Ray reconstructs from an upstream client subsegment. from the client subsegment.

An inferred node is X-Ray’s reconstruction of a dependency from client observations. Lambda Active tracing follows upstream samplingThe selection of requests whose tracing data will be recorded. and produces segments for sampled requests.

Exam cues

  • If the question says a request crosses several services, think an X-Ray trace, because it groups the recorded segments for that request.
  • If the question says one service operation needs more detail, think a subsegment, because it records part of the work within a segment.
  • If the question says DynamoDB has an inferred node, think instrumented client subsegments, because X-Ray derives the node from the client record.

Remember

  • A segment document has a maximum size of 64 kB.
  • Incoming trace headers can come from clients; applications can remove them to avoid client-controlled trace IDs and sampling decisions.
  • X-Ray SDKs and daemon: maintenance mode since February 25, 2026; use OpenTelemetryAn observability framework for generating, collecting, and exporting traces and other telemetry. for new instrumentationCode or configuration that records application work for telemetry collection..

Trap: An inferred node does not mean the dependency emitted its own trace segment. X-Ray derives it from the client subsegment.

One trace across API Gateway, Lambda and DynamoDB
request1trace header2SDK call3ClientiAPI Gatewayactive tracing on stageiLambdaActive tracingiDynamoDBinferred nodei
  1. The request enters API Gateway, which decides whether to sample it and adds the tracing header.

  2. Lambda receives the header and, with Active tracing, sends its segments when the request is sampled, so the nodes connect into one trace.

  3. An instrumented SDK client adds a subsegment for the DynamoDB call, which shows its latency and errors.

Box details (4)
Client

A request with no tracing header gets one from the first X-Ray-integrated service it hits.

API Gateway

Makes the sampling decision using your sampling rules and adds X-Amzn-Trace-Id with Sampled=1 or 0. REST APIs only.

Lambda

With Active tracing, Lambda sends service and function segments for sampled requests and follows the upstream sampling decision.

DynamoDB

DynamoDB sends no segment itself. An instrumented AWS SDK client records a subsegment, and X-Ray draws the node from it.

From the AWS docs (9)
  • An X-Ray trace collects segments associated with one request and shows its path through services.
  • A segment records one resource or service handling a request, including timing and response information.
  • A subsegment describes part of a segment, such as an outgoing service call, SQL query, or custom block of code.
  • X-Ray derives inferred segments and graph nodes for services such as DynamoDB from instrumented client subsegments.
  • API Gateway REST API stages can make sampling decisions and add trace headers to requests without one.
  • Lambda Active tracing sends segments for sampled requests and follows the upstream sampling decision.
  • An X-Ray segment document can be at most 64 kB.
  • Trace headers can come from clients; an application can remove incoming headers to avoid client-supplied trace IDs or sampling choices.
  • On February 25, 2026, the AWS X-Ray SDKs and daemon entered maintenance mode, with releases limited to security fixes; AWS recommends OpenTelemetry-based instrumentation instead.

Flashcards

tap to flip
Answer

·

All 3 cards as a list

What problem does AWS X-Ray solve for a request that crosses several services?

It joins the recorded work into a trace so you can inspect the request path, timing, and responses across services.

How do X-Ray traces, segments, and subsegments differ?

A trace groups one request. A segment describes a service handling it. A subsegment describes part of that work, such as a downstream call; client subsegments can also produce inferred nodes.

A new service needs distributed tracing that reaches AWS X-Ray (2026 onward). Should it add the X-Ray SDK and daemon?

No. Since February 2026 they are in maintenance mode; use OpenTelemetry-based instrumentation.

You finished every topic of SAA-C03!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified Solutions Architect - Associate (SAA-C03) on Easy Review. Come study too!