SageMaker SDK or SageMaker API: which one reigns supreme?
There are two main ways to interact with SageMaker in code - via SageMaker SDK or through the regular AWS API. Both methods let you send queries and commands to SageMaker. What's the difference then?
Like all SDKs in programming, SageMaker SDK adds a layer of abstraction to hide the complexity from the developers and accelerate the development. Instead of writing several lines of code, most things can be achieved with merely one or two. The higher-level constructs and the interface of the SDK are data science friendly and easy to begin your SageMaker path with.
What’s the catch? Anything that can be done via SDK can be also done via AWS API (which isn't a surprise - SageMaker SDK uses AWS API under the hood). However, the contrary is not always true. The SDK hides some lesser used features entirely or exposes only some parts of them. Additionally, when something breaks, you might be uncertain which exact part of SageMaker causes an error, because SDK executes many exotic calls on your behalf - troubleshooting is harder.
This means you can either have complete control by writing detailed, step-by-step instructions using the API, or you can use an SDK which provides a higher-level, easier-to-use interface for interacting with the API.
SageMaker SDK is a good choice when:
the default behavior of SDK actions meets your needs - no customization is required
you are new to SageMaker and do not need to delve too deeply into its capabilities
you want to build and iterate quickly, such as for prototypes, PoCs or MVPs
you are looking to automate your work with SageMaker Pipelines
AWS API is useful when:
you require a high level of control and customization, including the use of lesser-known features
you are automating tasks using tools other than SageMaker Pipelines
you are writing your own custom helper libraries
you want to get to know the internals of SageMaker and how it works