You trained a scikit-learn logistic regression model locally and now want to deploy it on Amazon SageMaker for inference only. What steps are required so SageMaker can host the locally trained model?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a Docker image that contains the inference code, tag it with the ECR registry hostname, and push the image to Amazon ECR..
Why this is the answer
To deploy a custom model like a locally trained scikit-learn model for inference on Amazon SageMaker, you need to provide SageMaker with a Docker image containing your inference code. This image must be stored in Amazon Elastic Container Registry (ECR) so SageMaker can access it. Therefore, you create the Docker image, tag it appropriately with the ECR registry hostname, and then push it to ECR. The incorrect options fail because: Uploading a Docker image to Amazon S3 is not how SageMaker accesses container images; it uses ECR. Uploading to Docker Hub is not the standard or secure way for SageMaker to access private images; ECR is the AWS-native solution. While building the Docker image and pushing to ECR are correct, configuring Docker Hub credentials is irrelevant when using ECR.
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