ModelProps
- class aws_cdk.aws_sagemaker_alpha.ModelProps(*, allow_all_outbound=None, containers=None, model_name=None, network_isolation=None, role=None, security_groups=None, vpc=None, vpc_subnets=None)
Bases:
object
(experimental) Construction properties for a SageMaker Model.
- Parameters:
allow_all_outbound (
Optional
[bool
]) – (experimental) 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. Default: truecontainers (
Optional
[Sequence
[Union
[ContainerDefinition
,Dict
[str
,Any
]]]]) – (experimental) Specifies the container definitions for this model, consisting of either a single primary container or an inference pipeline of multiple containers. Default: - nonemodel_name (
Optional
[str
]) – (experimental) Name of the SageMaker Model. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the model’s name.network_isolation (
Optional
[bool
]) – (experimental) Whether to enable network isolation for the model container. When enabled, no inbound or outbound network calls can be made to or from the model container. Default: falserole (
Optional
[IRole
]) – (experimental) The IAM role that the Amazon SageMaker service assumes. Default: - a new IAM role will be created with theAmazonSageMakerFullAccess
policy attached.security_groups (
Optional
[Sequence
[ISecurityGroup
]]) – (experimental) 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. Default: - A security group will be automatically created if ‘vpc’ is suppliedvpc (
Optional
[IVpc
]) – (experimental) The VPC to deploy model containers to. Default: - nonevpc_subnets (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – (experimental) The VPC subnets to use when deploying model containers. Default: - none
- Stability:
experimental
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_sagemaker_alpha as sagemaker # image: sagemaker.ContainerImage # model_data: sagemaker.ModelData model = sagemaker.Model(self, "ContainerModel", containers=[sagemaker.ContainerDefinition( image=image, model_data=model_data ) ], network_isolation=True )
Attributes
- allow_all_outbound
(experimental) 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.
- Default:
true
- Stability:
experimental
- containers
(experimental) Specifies the container definitions for this model, consisting of either a single primary container or an inference pipeline of multiple containers.
- Default:
none
- Stability:
experimental
- model_name
(experimental) Name of the SageMaker Model.
- Default:
AWS CloudFormation generates a unique physical ID and uses that ID for the model’s
name.
- Stability:
experimental
- network_isolation
(experimental) Whether to enable network isolation for the model container.
When enabled, no inbound or outbound network calls can be made to or from the model container.
- Default:
false
- See:
https://docs.aws.amazon.com/sagemaker/latest/dg/mkt-algo-model-internet-free.html
- Stability:
experimental
- role
(experimental) The IAM role that the Amazon SageMaker service assumes.
- Default:
a new IAM role will be created with the
AmazonSageMakerFullAccess
policy attached.
- See:
- Stability:
experimental
- security_groups
(experimental) 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.
- Default:
A security group will be automatically created if ‘vpc’ is supplied
- Stability:
experimental
- vpc
(experimental) The VPC to deploy model containers to.
- Default:
none
- Stability:
experimental
- vpc_subnets
(experimental) The VPC subnets to use when deploying model containers.
- Default:
none
- Stability:
experimental