Declaring an AWS::SageMaker::Model Resource in CloudFormation for Inference Hosting
An ML engineer needs to use AWS CloudFormation to create an ML model that an Amazon SageMaker endpoint will host. Which resource should the ML engineer declare in the CloudFormation template to meet this requirement?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
Community Discussion (3 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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
Related Analysis
Practice All MLA-C01 Questions
Access 115 questions with complete answers and detailed explanations.
View Full MLA-C01 Practice Test →