aws / aws/aws-cdk

sagemaker: Make IEndpointConfig property of Endpoint optional

Open
#23,162 0 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-sagemaker effort/small feature-request p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Even though explicitly defining an `EndpointConfig` resource allows for reusable configuration across endpoints, as [discussed on the original `Endpoint` L2 construct PR](https://github.com/aws/aws-cdk/pull/22886#discussion_r1028488567), customers looking to deploy a single endpoint may find it easier to have the endpoint configuration encapsulated within the endpoint construct.

**Please 👍 this issue to help with the prioritization of this feature.**

### Use Case

Customers may not want to have to define their own `IEndpointConfig` resource, instead relying on `Endpoint` to instantiate one for them (in the event they don't provide one on `EndpointProps`).

### Proposed Solution

Add each of [these members of `EndpointConfigProps`](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/aws-sagemaker/lib/endpoint-config.ts#L132-L145) to `EndpointProps` as optional arguments (while making the existing `IEndpointConfig` prop value optional as well) while ensuring that the `IEndpointConfig` property and the new members are mutually exclusive.

In this scenario, it likely also make sense to include an `addInstanceProductionVariant` on `Endpoint` so that customers can mutate the backing `EndpointConfig` in the same manner as they could using their own instance (this does have the added bonus of returning an `IEndpointInstanceProductionVariant` instance from the method, eliminating the need for customers to look up the variant by name).

### Other Information

_No response_

### Acknowledgements

- [X] I _may_ be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.54.0-alpha.0

### Environment details (OS name and version, etc.)

macOS Ventura

Contributor guide

Open the contributing guide

Research direction

Start with the EndpointProps and Endpoint implementation, then read the EndpointConfigProps members in packages/@aws-cdk/aws-sagemaker/lib/endpoint-config.ts. Define the supported mutually exclusive inputs and consider how Endpoint would expose addInstanceProductionVariant; done means single-endpoint users can omit IEndpointConfig while existing explicit configurations remain supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.