An application running as microservices on Amazon ECS with Fargate is returning errors to users. Which of the following steps should a developer take to diagnose and fix the issues? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Run the AWS X-Ray daemon as a sidecar container alongside the microservices and update the task role policy to permit X-Ray API access..
Why this is the answer
To diagnose issues in microservices on ECS Fargate, distributed tracing with AWS X-Ray is highly effective. Running the X-Ray daemon as a sidecar container allows it to collect trace data from the application without requiring direct network calls from the application to the X-Ray service. This is a common and recommended pattern for Fargate. The task role policy must be updated to grant the necessary permissions for the daemon to send trace data to X-Ray. Incorrect options: Deploying a Kubernetes-style daemonset is not applicable to Amazon ECS Fargate, which uses its own orchestration model, not Kubernetes. Directly calling the PutXrayTrace API from the application is generally not recommended. The X-Ray SDK and daemon handle this efficiently, buffering and sending data in batches, which is more robust and performs better. While instrumenting with the X-Ray SDK is correct, the application should send trace data to the local X-Ray daemon (as described in the correct answer), not directly to the X-Ray service. Sending stdout/stderr to CloudWatch Logs is good for general logging but doesn't provide the distributed tracing context needed to diagnose issues across multiple microservices. It helps with individual service logs but not end-to-end request flows.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed