Skip to content

Commit 85a8b9d

Browse files
author
awstools
committed
feat(client-sagemaker): SageMaker Inference Recommender now accepts customer KMS key ID for encryption of endpoints and compilation outputs created during inference recommendation.
1 parent 34b8325 commit 85a8b9d

File tree

8 files changed

+499
-108
lines changed

8 files changed

+499
-108
lines changed

clients/client-sagemaker/src/commands/DescribeLineageGroupCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
SerdeContext as __SerdeContext,
1212
} from "@aws-sdk/types";
1313

14-
import { DescribeLineageGroupRequest, DescribeLineageGroupResponse } from "../models/models_1";
14+
import { DescribeLineageGroupRequest } from "../models/models_1";
15+
import { DescribeLineageGroupResponse } from "../models/models_2";
1516
import {
1617
deserializeAws_json1_1DescribeLineageGroupCommand,
1718
serializeAws_json1_1DescribeLineageGroupCommand,

clients/client-sagemaker/src/commands/DescribeModelCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
SerdeContext as __SerdeContext,
1212
} from "@aws-sdk/types";
1313

14-
import { DescribeModelInput } from "../models/models_1";
15-
import { DescribeModelOutput } from "../models/models_2";
14+
import { DescribeModelInput, DescribeModelOutput } from "../models/models_2";
1615
import {
1716
deserializeAws_json1_1DescribeModelCommand,
1817
serializeAws_json1_1DescribeModelCommand,

clients/client-sagemaker/src/commands/ListTrainingJobsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
SerdeContext as __SerdeContext,
1212
} from "@aws-sdk/types";
1313

14-
import { ListTrainingJobsRequest, ListTrainingJobsResponse } from "../models/models_2";
14+
import { ListTrainingJobsRequest } from "../models/models_2";
15+
import { ListTrainingJobsResponse } from "../models/models_3";
1516
import {
1617
deserializeAws_json1_1ListTrainingJobsCommand,
1718
serializeAws_json1_1ListTrainingJobsCommand,

clients/client-sagemaker/src/models/models_1.ts

Lines changed: 128 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,49 @@ export interface RecommendationJobInputConfig {
243243
* <p>Specifies the endpoint configuration to use for a job.</p>
244244
*/
245245
EndpointConfigurations?: EndpointInputConfiguration[];
246+
247+
/**
248+
* <p>The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service (Amazon Web Services KMS) key
249+
* that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
250+
* This key will be passed to SageMaker Hosting for endpoint creation. </p>
251+
*
252+
* <p>The SageMaker execution role must have <code>kms:CreateGrant</code> permission in order to encrypt data on the storage
253+
* volume of the endpoints created for inference recommendation. The inference recommendation job will fail
254+
* asynchronously during endpoint configuration creation if the role passed does not have
255+
* <code>kms:CreateGrant</code> permission.</p>
256+
*
257+
* <p>The <code>KmsKeyId</code> can be any of the following formats:</p>
258+
* <ul>
259+
* <li>
260+
* <p>// KMS Key ID</p>
261+
* <p>
262+
* <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
263+
* </p>
264+
* </li>
265+
* <li>
266+
* <p>// Amazon Resource Name (ARN) of a KMS Key</p>
267+
* <p>
268+
* <code>"arn:aws:kms:<region>:<account>:key/<key-id-12ab-34cd-56ef-1234567890ab>"</code>
269+
* </p>
270+
* </li>
271+
* <li>
272+
* <p>// KMS Key Alias</p>
273+
* <p>
274+
* <code>"alias/ExampleAlias"</code>
275+
* </p>
276+
* </li>
277+
* <li>
278+
* <p>// Amazon Resource Name (ARN) of a KMS Key Alias</p>
279+
* <p>
280+
* <code>"arn:aws:kms:<region>:<account>:alias/<ExampleAlias>"</code>
281+
* </p>
282+
* </li>
283+
* </ul>
284+
* <p>For more information about key identifiers, see
285+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">Key identifiers (KeyID)</a> in the
286+
* Amazon Web Services Key Management Service (Amazon Web Services KMS) documentation.</p>
287+
*/
288+
VolumeKmsKeyId?: string;
246289
}
247290

248291
export namespace RecommendationJobInputConfig {
@@ -259,6 +302,85 @@ export enum RecommendationJobType {
259302
DEFAULT = "Default",
260303
}
261304

305+
/**
306+
* <p>Provides information about the output configuration for the compiled
307+
* model.</p>
308+
*/
309+
export interface RecommendationJobCompiledOutputConfig {
310+
/**
311+
* <p>Identifies the Amazon S3 bucket where you want SageMaker to store the
312+
* compiled model artifacts.</p>
313+
*/
314+
S3OutputUri?: string;
315+
}
316+
317+
export namespace RecommendationJobCompiledOutputConfig {
318+
/**
319+
* @internal
320+
*/
321+
export const filterSensitiveLog = (obj: RecommendationJobCompiledOutputConfig): any => ({
322+
...obj,
323+
});
324+
}
325+
326+
/**
327+
* <p>Provides information about the output configuration for the compiled model.</p>
328+
*/
329+
export interface RecommendationJobOutputConfig {
330+
/**
331+
* <p>The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service (Amazon Web Services KMS) key
332+
* that Amazon SageMaker uses to encrypt your output artifacts with Amazon S3 server-side encryption.
333+
* The SageMaker execution role must have <code>kms:GenerateDataKey</code> permission.</p>
334+
*
335+
* <p>The <code>KmsKeyId</code> can be any of the following formats:</p>
336+
* <ul>
337+
* <li>
338+
* <p>// KMS Key ID</p>
339+
* <p>
340+
* <code>"1234abcd-12ab-34cd-56ef-1234567890ab"</code>
341+
* </p>
342+
* </li>
343+
* <li>
344+
* <p>// Amazon Resource Name (ARN) of a KMS Key</p>
345+
* <p>
346+
* <code>"arn:aws:kms:<region>:<account>:key/<key-id-12ab-34cd-56ef-1234567890ab>"</code>
347+
* </p>
348+
* </li>
349+
* <li>
350+
* <p>// KMS Key Alias</p>
351+
* <p>
352+
* <code>"alias/ExampleAlias"</code>
353+
* </p>
354+
* </li>
355+
* <li>
356+
* <p>// Amazon Resource Name (ARN) of a KMS Key Alias</p>
357+
* <p>
358+
* <code>"arn:aws:kms:<region>:<account>:alias/<ExampleAlias>"</code>
359+
* </p>
360+
* </li>
361+
* </ul>
362+
* <p>For more information about key identifiers, see
363+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">Key identifiers (KeyID)</a> in the
364+
* Amazon Web Services Key Management Service (Amazon Web Services KMS) documentation.</p>
365+
*/
366+
KmsKeyId?: string;
367+
368+
/**
369+
* <p>Provides information about the output configuration for the compiled
370+
* model.</p>
371+
*/
372+
CompiledOutputConfig?: RecommendationJobCompiledOutputConfig;
373+
}
374+
375+
export namespace RecommendationJobOutputConfig {
376+
/**
377+
* @internal
378+
*/
379+
export const filterSensitiveLog = (obj: RecommendationJobOutputConfig): any => ({
380+
...obj,
381+
});
382+
}
383+
262384
/**
263385
* <p>The model latency threshold.</p>
264386
*/
@@ -348,6 +470,12 @@ export interface CreateInferenceRecommendationsJobRequest {
348470
*/
349471
StoppingConditions?: RecommendationJobStoppingConditions;
350472

473+
/**
474+
* <p>Provides information about the output artifacts and the KMS key
475+
* to use for Amazon S3 server-side encryption.</p>
476+
*/
477+
OutputConfig?: RecommendationJobOutputConfig;
478+
351479
/**
352480
* <p>The metadata that you apply to Amazon Web Services resources to help you
353481
* categorize and organize them. Each tag consists of a key and a value, both of
@@ -11371,72 +11499,3 @@ export namespace DescribeLineageGroupRequest {
1137111499
...obj,
1137211500
});
1137311501
}
11374-
11375-
export interface DescribeLineageGroupResponse {
11376-
/**
11377-
* <p>The name of the lineage group.</p>
11378-
*/
11379-
LineageGroupName?: string;
11380-
11381-
/**
11382-
* <p>The Amazon Resource Name (ARN) of the lineage group.</p>
11383-
*/
11384-
LineageGroupArn?: string;
11385-
11386-
/**
11387-
* <p>The display name of the lineage group.</p>
11388-
*/
11389-
DisplayName?: string;
11390-
11391-
/**
11392-
* <p>The description of the lineage group.</p>
11393-
*/
11394-
Description?: string;
11395-
11396-
/**
11397-
* <p>The creation time of lineage group.</p>
11398-
*/
11399-
CreationTime?: Date;
11400-
11401-
/**
11402-
* <p>Information about the user who created or modified an experiment, trial, trial
11403-
* component, lineage group, or project.</p>
11404-
*/
11405-
CreatedBy?: UserContext;
11406-
11407-
/**
11408-
* <p>The last modified time of the lineage group.</p>
11409-
*/
11410-
LastModifiedTime?: Date;
11411-
11412-
/**
11413-
* <p>Information about the user who created or modified an experiment, trial, trial
11414-
* component, lineage group, or project.</p>
11415-
*/
11416-
LastModifiedBy?: UserContext;
11417-
}
11418-
11419-
export namespace DescribeLineageGroupResponse {
11420-
/**
11421-
* @internal
11422-
*/
11423-
export const filterSensitiveLog = (obj: DescribeLineageGroupResponse): any => ({
11424-
...obj,
11425-
});
11426-
}
11427-
11428-
export interface DescribeModelInput {
11429-
/**
11430-
* <p>The name of the model.</p>
11431-
*/
11432-
ModelName: string | undefined;
11433-
}
11434-
11435-
export namespace DescribeModelInput {
11436-
/**
11437-
* @internal
11438-
*/
11439-
export const filterSensitiveLog = (obj: DescribeModelInput): any => ({
11440-
...obj,
11441-
});
11442-
}

clients/client-sagemaker/src/models/models_2.ts

Lines changed: 69 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,75 @@ import {
134134
TrialComponentStatus,
135135
} from "./models_1";
136136

137+
export interface DescribeLineageGroupResponse {
138+
/**
139+
* <p>The name of the lineage group.</p>
140+
*/
141+
LineageGroupName?: string;
142+
143+
/**
144+
* <p>The Amazon Resource Name (ARN) of the lineage group.</p>
145+
*/
146+
LineageGroupArn?: string;
147+
148+
/**
149+
* <p>The display name of the lineage group.</p>
150+
*/
151+
DisplayName?: string;
152+
153+
/**
154+
* <p>The description of the lineage group.</p>
155+
*/
156+
Description?: string;
157+
158+
/**
159+
* <p>The creation time of lineage group.</p>
160+
*/
161+
CreationTime?: Date;
162+
163+
/**
164+
* <p>Information about the user who created or modified an experiment, trial, trial
165+
* component, lineage group, or project.</p>
166+
*/
167+
CreatedBy?: UserContext;
168+
169+
/**
170+
* <p>The last modified time of the lineage group.</p>
171+
*/
172+
LastModifiedTime?: Date;
173+
174+
/**
175+
* <p>Information about the user who created or modified an experiment, trial, trial
176+
* component, lineage group, or project.</p>
177+
*/
178+
LastModifiedBy?: UserContext;
179+
}
180+
181+
export namespace DescribeLineageGroupResponse {
182+
/**
183+
* @internal
184+
*/
185+
export const filterSensitiveLog = (obj: DescribeLineageGroupResponse): any => ({
186+
...obj,
187+
});
188+
}
189+
190+
export interface DescribeModelInput {
191+
/**
192+
* <p>The name of the model.</p>
193+
*/
194+
ModelName: string | undefined;
195+
}
196+
197+
export namespace DescribeModelInput {
198+
/**
199+
* @internal
200+
*/
201+
export const filterSensitiveLog = (obj: DescribeModelInput): any => ({
202+
...obj,
203+
});
204+
}
205+
137206
export interface DescribeModelOutput {
138207
/**
139208
* <p>Name of the Amazon SageMaker model.</p>
@@ -10810,33 +10879,3 @@ export namespace TrainingJobSummary {
1081010879
...obj,
1081110880
});
1081210881
}
10813-
10814-
export interface ListTrainingJobsResponse {
10815-
/**
10816-
* <p>An array of <code>TrainingJobSummary</code> objects, each listing a training
10817-
* job.</p>
10818-
*/
10819-
TrainingJobSummaries: TrainingJobSummary[] | undefined;
10820-
10821-
/**
10822-
* <p>If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of
10823-
* training jobs, use it in the subsequent request.</p>
10824-
*/
10825-
NextToken?: string;
10826-
}
10827-
10828-
export namespace ListTrainingJobsResponse {
10829-
/**
10830-
* @internal
10831-
*/
10832-
export const filterSensitiveLog = (obj: ListTrainingJobsResponse): any => ({
10833-
...obj,
10834-
});
10835-
}
10836-
10837-
export enum TrainingJobSortByOptions {
10838-
CreationTime = "CreationTime",
10839-
FinalObjectiveMetricValue = "FinalObjectiveMetricValue",
10840-
Name = "Name",
10841-
Status = "Status",
10842-
}

0 commit comments

Comments
 (0)