aws xray batch-get-traces
You cannot find traces through this API if Transaction Search is enabled since trace is not indexed in X-Ray. AWS CLI reference
2 options Its page in the AWS CLI reference
Options
--next-tokenPagination token.--trace-idsSpecify the trace IDs of requests for which to retrieve segments.