Skip to content

Commit e30f781

Browse files
authored
Merge branch 'master' into huijbers/v2-to-node-14
2 parents e807e89 + 30f4584 commit e30f781

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

packages/@aws-cdk/aws-stepfunctions-tasks/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,10 @@ disable this behavior.
969969

970970
Step Functions supports [AWS SageMaker](https://docs.aws.amazon.com/step-functions/latest/dg/connect-sagemaker.html) through the service integration pattern.
971971

972+
If your training job or model uses resources from AWS Marketplace,
973+
[network isolation is required](https://docs.aws.amazon.com/sagemaker/latest/dg/mkt-algo-model-internet-free.html).
974+
To do so, set the `enableNetworkIsolation` property to `true` for `SageMakerCreateModel` or `SageMakerCreateTrainingJob`.
975+
972976
### Create Training Job
973977

974978
You can call the [`CreateTrainingJob`](https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) API from a `Task` state.

packages/@aws-cdk/aws-stepfunctions-tasks/lib/sagemaker/create-training-job.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ export interface SageMakerCreateTrainingJobProps extends sfn.TaskStateBaseProps
3232
*/
3333
readonly algorithmSpecification: AlgorithmSpecification;
3434

35+
/**
36+
* Isolates the training container. No inbound or outbound network calls can be made to or from the training container.
37+
*
38+
* @default false
39+
*/
40+
readonly enableNetworkIsolation?: boolean;
41+
3542
/**
3643
* Algorithm-specific parameters that influence the quality of the model. Set hyperparameters before you start the learning process.
3744
* For a list of hyperparameters provided by Amazon SageMaker
@@ -217,6 +224,7 @@ export class SageMakerCreateTrainingJob extends sfn.TaskStateBase implements iam
217224
private renderParameters(): { [key: string]: any } {
218225
return {
219226
TrainingJobName: this.props.trainingJobName,
227+
EnableNetworkIsolation: this.props.enableNetworkIsolation,
220228
RoleArn: this._role!.roleArn,
221229
...this.renderAlgorithmSpecification(this.algorithmSpecification),
222230
...this.renderInputDataConfig(this.inputDataConfig),

packages/@aws-cdk/aws-stepfunctions-tasks/test/sagemaker/create-training-job.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ test('create complex training job', () => {
142142
},
143143
],
144144
},
145+
enableNetworkIsolation: true,
145146
hyperparameters: {
146147
lr: '0.1',
147148
},
@@ -221,6 +222,7 @@ test('create complex training job', () => {
221222
{ Name: 'mymetric', Regex: 'regex_pattern' },
222223
],
223224
},
225+
EnableNetworkIsolation: true,
224226
HyperParameters: {
225227
lr: '0.1',
226228
},

packages/@aws-cdk/pipelines/lib/legacy/pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface CdkPipelineProps {
5151
* You can choose to not pass this value, in which case a new CodePipeline is
5252
* created with default settings.
5353
*
54-
* If you pass an existing CodePipeline, it should should have been created
54+
* If you pass an existing CodePipeline, it should have been created
5555
* with `restartExecutionOnUpdate: true`.
5656
*
5757
* [disable-awslint:ref-via-interface]

0 commit comments

Comments
 (0)