ladderlore
လမ်းညွှန် တောင်းဆိုရန်
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

သဘောတရား · SAA-C03 အပေါ် ဆက်လေ့လာရန်

Logs and tracing to troubleshoot ML systems

Read the signal first: logs for container errors, traces for slow hops, CloudTrail for denied or failed API calls.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

Solutions Architect Associate မှ သင်သိပြီးသားများ

  • X-Ray traces a request through services and draws a trace map.
  • It samples requests and shows which part is slow or failing.
  • Lambda and API Gateway can send traces when tracing is on.
Solutions Architect Associate သင်ခန်းစာကို ဖတ်ရန်
Client
API Gateway
Lambda
SageMaker endpoint
X-Ray trace
Container logs
Traces cover the hops, logs cover the inside of the container.
  • Training job failed

    FailureReason and job logs
  • Endpoint returns 5XX

    Container logs, then metrics
  • Whole request is slow

    X-Ray trace map
  • AccessDenied or validation error

    CloudTrail event
  • Out-of-memory suspicion

    Memory metric and logs
Symptom to signal.

ဘာလဲ

SageMaker AI sends container output to CloudWatch Logs: stdout and stderr from training jobs go to /aws/sagemaker/TrainingJobs, endpoints to /aws/sagemaker/Endpoints/your-endpoint-name, and processing jobs to /aws/sagemaker/ProcessingJobs. When a training job fails, the job description shows a FailureReason, such as AlgorithmError for a problem in the training code or ClientError for a configuration or permission problem. The log tells you the exact line. Use Logs Insights to search many streams at once, for example all lines with the word Error in the last hour.

ဘာလဲ

A trace answers a different question: where does the time go across services? In an app where API Gateway calls Lambda and Lambda calls a SageMaker endpoint, X-Ray tracing shows the time spent in each hop, so you see if the endpoint call or the pre-processing code is slow. The endpoint container itself shows up as one call; look in its logs for the inside.

ဘာလဲ

CloudTrail records API calls and their errors. If a job never starts or a call returns AccessDenied or ValidationException, the CloudTrail event shows who called what and the error message. Read the signal in order: a metric alarm tells you something is wrong, a trace tells you which hop, logs tell you why, and CloudTrail tells you which API call was refused.

မှတ်ထားရန်

  • Job and container logs go to CloudWatch Logs under /aws/sagemaker/.
  • FailureReason on a training job: AlgorithmError for code, ClientError for setup or permissions.
  • Logs Insights searches across log streams.
  • X-Ray: which hop is slow, such as API Gateway, Lambda or an endpoint call.

မှတ်ထားရန်

  • CloudTrail: which API call was denied or failed, and why.
  • Order: metric, trace, log, CloudTrail.

စာမေးပွဲမှာ

  • “Training job failed, find the line of code” points to the job logs in CloudWatch Logs.
  • “Which service in the chain adds the latency?” points to X-Ray traces.
  • “Who called CreateEndpoint and got AccessDenied?” points to CloudTrail.
  • “Search all endpoint logs for one error string” points to CloudWatch Logs Insights.