aws-cdk-lib.aws_stepfunctions_tasks.ContainerDefinitionOptions

interface ContainerDefinitionOptions

LanguageType name
.NETAmazon.CDK.AWS.StepFunctions.Tasks.ContainerDefinitionOptions
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks#ContainerDefinitionOptions
Javasoftware.amazon.awscdk.services.stepfunctions.tasks.ContainerDefinitionOptions
Pythonaws_cdk.aws_stepfunctions_tasks.ContainerDefinitionOptions
TypeScript (source)aws-cdk-lib » aws_stepfunctions_tasks » ContainerDefinitionOptions

Properties to define a ContainerDefinition.

See also: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ContainerDefinition.html

Example

new tasks.SageMakerCreateModel(this, 'Sagemaker', {
  modelName: 'MyModel',
  primaryContainer: new tasks.ContainerDefinition({
    image: tasks.DockerImage.fromJsonExpression(sfn.JsonPath.stringAt('$.Model.imageName')),
    mode: tasks.Mode.SINGLE_MODEL,
    modelS3Location: tasks.S3Location.fromJsonExpression('$.TrainingJob.ModelArtifacts.S3ModelArtifacts'),
  }),
});

Properties

NameTypeDescription
containerHostName?stringThis parameter is ignored for models that contain only a PrimaryContainer.
environmentVariables?TaskInputThe environment variables to set in the Docker container.
image?DockerImageThe Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.
mode?ModeDefines how many models the container hosts.
modelPackageName?stringThe name or Amazon Resource Name (ARN) of the model package to use to create the model.
modelS3Location?S3LocationThe S3 path where the model artifacts, which result from model training, are stored.

containerHostName?

Type: string (optional, default: None)

This parameter is ignored for models that contain only a PrimaryContainer.

When a ContainerDefinition is part of an inference pipeline, the value of the parameter uniquely identifies the container for the purposes of logging and metrics.


environmentVariables?

Type: TaskInput (optional, default: No variables)

The environment variables to set in the Docker container.


image?

Type: DockerImage (optional, default: None)

The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.


mode?

Type: Mode (optional, default: Mode.SINGLE_MODEL)

Defines how many models the container hosts.


modelPackageName?

Type: string (optional, default: None)

The name or Amazon Resource Name (ARN) of the model package to use to create the model.


modelS3Location?

Type: S3Location (optional, default: None)

The S3 path where the model artifacts, which result from model training, are stored.

This path must point to a single gzip compressed tar archive (.tar.gz suffix). The S3 path is required for Amazon SageMaker built-in algorithms, but not if you use your own algorithms.