- Newest
- Most votes
- Most comments
When your SageMaker asynchronous endpoint accepts a job but never processes it (no invocation logs, no output or error files), there are several potential issues to investigate:
-
CloudWatch Logs Location: Make sure you're checking the correct CloudWatch log location. For asynchronous endpoints, review logs under
/aws/sagemaker/Endpoints/your-endpoint-nameand specifically the log stream namedyour-production-variant-name/your-instance-id/data-log. -
Container Structure Issues: Your custom container might have structural problems that prevent proper invocation:
- Check if your inference code (typically 'inference.py') is correctly located in a 'code/' subfolder within your model tarball
- Ensure the
/usr/bin/servefile exists in your container - Verify your model artifacts are properly copied to
/opt/ml/model(a missing trailing slash in paths can cause issues)
-
Log Buffering: Python might be buffering logs, which prevents them from appearing before the process crashes. Try setting the environment variable
PYTHONUNBUFFEREDto "1" when creating your model to disable Python log buffering. -
Request TTL and Invocation Timeout: Check if your
RequestTTLSecondsandInvocationTimeoutSecondsparameters in yourinvoke_endpoint_asynccall are appropriate. The default TTL is 6 hours, and the default invocation timeout is 15 minutes. -
Container Health Check vs. Invocation: Your container is responding to health checks (/ping) but might be failing when processing actual invocations. This could indicate a problem with how your container handles the invocation request specifically.
-
Model Artifact Conflicts: The container might be encountering conflicts when trying to load your model. Ensure your model tarball extracts correctly and doesn't create unexpected subfolders.
-
Local Testing: Consider testing your inference code locally using SageMaker Local Mode with 'instance_type=local' to identify issues before cloud deployment.
Since your container is healthy enough to respond to ping requests but not processing invocations, focus on how your container handles the specific invocation path and whether it can access the input data from S3 during the actual inference process.
Sources
Sagemaker endpoint creation failing | AWS re:Post
Failed to create endpoint in sagemaker without any reason and logs | AWS re:Post
Troubleshoot invoke issues with Sagemaker AI asynchronous endpoints | AWS re:Post
