Declaring an AWS::SageMaker::Model Resource in CloudFormation for Inference Hosting
Short answer
A AWS::SageMaker::Model defines the model with its S3 artifact location, inference container, and execution role, making it the resource an endpoint later hosts.
Question
Key Takeaways
AWS::SageMaker::Model is the CloudFormation resource that defines the model, holding the S3 location of the model artifacts, the inference container, and the IAM execution role, which makes it the prerequisite resource an endpoint then hosts.
An ML engineer needs to use AWS CloudFormation to create the ML model that a SageMaker endpoint will host. The question asks which resource type the template must declare, so what is needed is the resource that defines the model itself, including its artifact location, container image, and execution role.
Common mistake: Declaring AWS::SageMaker::Endpoint, which is the hosting resource rather than the model definition, or choosing a NotebookInstance or Pipeline resource, neither of which creates an inference model at all.
Expert Analysis
Why the Answer Is Correct
The requirement is to create the ML model in CloudFormation, not the endpoint, so the template must declare the resource type that defines a model. AWS::SageMaker::Model is that resource, and its properties are exactly what a model needs: the Containers list with a ContainerDefinition that includes the S3 location of the model artifacts and the inference image, the ExecutionRoleArn, the ModelName, and optional VpcConfig and network isolation settings. Because the model resource is a prerequisite for deployment, the endpoint can then be created separately to host it. The vote was unanimous at 100 for A. Saransundar listed the AWS::SageMaker::Model properties verbatim, eesa explained that the resource defines the model including the artifact location in S3, the inference image, and the IAM role, and noted it is a prerequisite for deploying to an endpoint, and GiorgioGss cited the CloudFormation resource documentation.Why the Other Options Are Wrong
AWS::SageMaker::Endpoint (B) is the resource that hosts and serves a model for real-time inference, so declaring it alone would attempt deployment without the underlying model definition the question asks the template to create; it addresses the hosting step rather than the model creation step. AWS::SageMaker::NotebookInstance (C) provisions a Jupyter notebook environment for interactive development, which creates no model and is unrelated to hosting one at an endpoint. AWS::SageMaker::Pipeline (D) defines a SageMaker Pipelines workflow that orchestrates multi-step ML processing such as training and transformation, which is an orchestration construct rather than a single model resource and therefore does not satisfy the requirement to create the model.Community Comment Notes
The community was unanimous at 100 for A, and the comments line up closely with the resource property list. Saransundar reproduced the AWS::SageMaker::Model property set from the documentation, including the container definition and execution role. eesa summarized the role of the resource in one line, that it defines the model with the S3 artifact location, inference image or container, and IAM role, and that it is a prerequisite for endpoint deployment. GiorgioGss supplied the CloudFormation resource reference page as the authoritative source for the answer.Official Reference
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-model.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
Saransundar 👍 2 Answered AType: AWS::SageMaker::Model Properties: Containers: - ContainerDefinition EnableNetworkIsolation: Boolean ExecutionRoleArn: String InferenceExecutionConfig: InferenceExecutionConfig ModelName: String PrimaryContainer: ContainerDefinition Tags: - Tag VpcConfig: VpcConfig
-
eesa 👍 1 Answered AA. AWS::SageMaker::Model ✅ This resource defines the model, including: Location of model artifacts in S3 Inference image/container IAM role It is a prerequisite for deploying a model to an endpoint.
-
GiorgioGss 👍 1 Answered Ahttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-model.html
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All MLA-C01 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MLA-C01 Practice Test →