nerdexam
Amazon

DVA-C02 · Question #153

Users are reporting errors in an application. The application consists of several microservices that are deployed on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate. Which combination o

The correct answer is A. Deploy AWS X-Ray as a sidecar container to the microservices. Update the task role policy to D. Instrument the application by using the AWS X-Ray SDK. Update the application to communicate. Debugging ECS Fargate microservices with X-Ray requires deploying the X-Ray daemon as a sidecar container (since daemonsets are not supported on Fargate) and configuring the SDK to send traces to it.

Submitted by yuki_2020· Mar 5, 2026Monitoring and Troubleshooting

Question

Users are reporting errors in an application. The application consists of several microservices that are deployed on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate. Which combination of steps should a developer take to fix the errors? (Choose two.)

Options

  • ADeploy AWS X-Ray as a sidecar container to the microservices. Update the task role policy to
  • BDeploy AWS X-Ray as a daemonset to the Fargate cluster. Update the service role policy to allow
  • CInstrument the application by using the AWS X-Ray SDK. Update the application to use the
  • DInstrument the application by using the AWS X-Ray SDK. Update the application to communicate
  • EInstrument the ECS task to send the stdout and stderr output to Amazon CloudWatch Logs.

How the community answered

(19 responses)
  • A
    53% (10)
  • B
    32% (6)
  • C
    5% (1)
  • E
    11% (2)

Why each option

Debugging ECS Fargate microservices with X-Ray requires deploying the X-Ray daemon as a sidecar container (since daemonsets are not supported on Fargate) and configuring the SDK to send traces to it.

ADeploy AWS X-Ray as a sidecar container to the microservices. Update the task role policy toCorrect

On AWS Fargate, the X-Ray daemon must run as a sidecar container within the same task definition because Fargate does not support DaemonSet deployments; the task role policy must include xray:PutTraceSegments and xray:PutTelemetryRecords permissions.

BDeploy AWS X-Ray as a daemonset to the Fargate cluster. Update the service role policy to allow

DaemonSets are a Kubernetes concept; AWS Fargate does not support deploying the X-Ray daemon as a DaemonSet because Fargate abstracts away the underlying node infrastructure.

CInstrument the application by using the AWS X-Ray SDK. Update the application to use the

While instrumenting with the X-Ray SDK is correct, communicating via a centralized X-Ray daemon endpoint (not a sidecar) is the wrong architecture for Fargate where a per-task sidecar is required.

DInstrument the application by using the AWS X-Ray SDK. Update the application to communicateCorrect

The application must be instrumented with the X-Ray SDK and configured to send trace data to the X-Ray daemon listening on UDP port 2000 (or TCP for Fargate); without this endpoint configuration, the SDK cannot deliver segments to the daemon.

EInstrument the ECS task to send the stdout and stderr output to Amazon CloudWatch Logs.

Sending stdout/stderr to CloudWatch Logs enables log-based debugging but does not provide distributed tracing, service maps, or latency analysis that X-Ray provides for diagnosing microservice errors.

Concept tested: X-Ray sidecar container tracing for ECS Fargate

Source: https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-ecs.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice