@aws-cdk_aws-sagemaker-alpha.ModelProps

interface ModelProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Sagemaker.Alpha.ModelProps
Gogithub.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#ModelProps
Javasoftware.amazon.awscdk.services.sagemaker.alpha.ModelProps
Pythonaws_cdk.aws_sagemaker_alpha.ModelProps
TypeScript (source)@aws-cdk/aws-sagemaker-alpha ยป ModelProps

Construction properties for a SageMaker Model.

Example

import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';
import * as path from 'path';

const image = sagemaker.ContainerImage.fromAsset(path.join('path', 'to', 'Dockerfile', 'directory'));
const modelData = sagemaker.ModelData.fromAsset(path.join('path', 'to', 'artifact', 'file.tar.gz'));

const model = new sagemaker.Model(this, 'PrimaryContainerModel', {
  containers: [
    {
      image: image,
      modelData: modelData,
    }
  ]
});

Properties

NameTypeDescription
allowAllOutbound?๐Ÿ”นbooleanWhether to allow the SageMaker Model to send all network traffic.
containers?๐Ÿ”นContainerDefinition[]Specifies the container definitions for this model, consisting of either a single primary container or an inference pipeline of multiple containers.
modelName?๐Ÿ”นstringName of the SageMaker Model.
role?๐Ÿ”นIRoleThe IAM role that the Amazon SageMaker service assumes.
securityGroups?๐Ÿ”นISecurityGroup[]The security groups to associate to the Model.
vpc?๐Ÿ”นIVpcThe VPC to deploy model containers to.
vpcSubnets?๐Ÿ”นSubnetSelectionThe VPC subnets to use when deploying model containers.

allowAllOutbound?๐Ÿ”น

Type: boolean (optional, default: true)

Whether to allow the SageMaker Model to send all network traffic.

If set to false, you must individually add traffic rules to allow the SageMaker Model to connect to network targets.

Only used if 'vpc' is supplied.


containers?๐Ÿ”น

Type: ContainerDefinition[] (optional, default: none)

Specifies the container definitions for this model, consisting of either a single primary container or an inference pipeline of multiple containers.


modelName?๐Ÿ”น

Type: string (optional, default: AWS CloudFormation generates a unique physical ID and uses that ID for the model's name.)

Name of the SageMaker Model.


role?๐Ÿ”น

Type: IRole (optional, default: a new IAM role will be created with the AmazonSageMakerFullAccess policy attached.)

The IAM role that the Amazon SageMaker service assumes.

See also: https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html#sagemaker-roles-createmodel-perms


securityGroups?๐Ÿ”น

Type: ISecurityGroup[] (optional, default: A security group will be automatically created if 'vpc' is supplied)

The security groups to associate to the Model.

If no security groups are provided and 'vpc' is configured, one security group will be created automatically.


vpc?๐Ÿ”น

Type: IVpc (optional, default: none)

The VPC to deploy model containers to.


vpcSubnets?๐Ÿ”น

Type: SubnetSelection (optional, default: none)

The VPC subnets to use when deploying model containers.