Description: Deploy the development Amazon SageMaker Endpoint. Parameters: ImageRepoUri: Type: String Description: Uri of the docker (ECR) model image ModelName: Type: String Description: Name of the model TrainJobId: Type: String Description: Id of the Codepipeline + SagemakerJobs DeployRoleArn: Type: String Description: The role for executing the deployment ModelVariant: Type: String Description: Name of the endpoint variant KmsKeyId: Description: AWS KMS key ID used to encrypt data at rest on the ML storage volume attached to endpoint config. Type: String Resources: Model: Type: "AWS::SageMaker::Model" Properties: ModelName: !Sub ${ModelName}-dev-${TrainJobId} PrimaryContainer: Image: !Ref ImageRepoUri ModelDataUrl: !Sub s3://sagemaker-${AWS::Region}-${AWS::AccountId}/${ModelName}/${ModelName}-${TrainJobId}/output/model.tar.gz ExecutionRoleArn: !Ref DeployRoleArn EndpointConfig: Type: "AWS::SageMaker::EndpointConfig" Properties: ProductionVariants: - InitialInstanceCount: 1 InitialVariantWeight: 1.0 InstanceType: ml.t2.medium ModelName: !GetAtt Model.ModelName VariantName: !Sub ${ModelVariant}-${ModelName} EndpointConfigName: !Sub ${ModelName}-dec-${TrainJobId} KmsKeyId: !Ref KmsKeyId Endpoint: Type: "AWS::SageMaker::Endpoint" Properties: EndpointName: !Sub ${ModelName}-dev-${TrainJobId} EndpointConfigName: !GetAtt EndpointConfig.EndpointConfigName