Knowledgebase

How to cleanup X-Ray tasks that cannot be removed from UI

If you're encountering issues removing tasks from the X-Ray UI, you might need to perform a manual cleanup using the AWS CLI or SDK. Here's a step-by-step guide:

  1. Install AWS CLI:

    Make sure you have the AWS CLI installed and configured with the necessary IAM permissions.

  2. List Traces:

    Run the following command to list traces and identify the trace IDs you want to remove:

    bash

 

  • aws xray get-trace-summaries
  • Delete Traces:

    Use the following command to delete traces by specifying the trace IDs:

    bash

 

aws xray batch-get-traces --trace-ids <trace_id_1> <trace_id_2> --query 'Traces[*].Id' --output text | xargs -n 1 aws xray delete-trace --trace-id

Replace <trace_id_1>, <trace_id_2>, etc., with the actual trace IDs you want to remove.

For Windows users without, you can use a loop:

cmd
  1. for %i in (<trace_id_1> <trace_id_2>) do aws xray delete-trace --trace-id %i
  2. Confirm Deletion:

    After running the command, it will return an empty response if the traces were successfully deleted.

    Important: Be careful when using these commands, as they permanently delete traces.

Please note that the AWS CLI commands might vary slightly based on your specific requirements and environment. Always make sure you have the necessary permissions and take caution when performing any deletions.

If you continue to experience issues or if the tasks still cannot be removed from the UI, consider reaching out to AWS Support for further assistance. They have access to more detailed information about the specific tasks and can provide tailored guidance.

 
  • 0 Users Found This Useful
Was this answer helpful?