In 2019, AWS announced Amazon SageMaker Studio, a unified integrated development environment (IDE) for machine learning (ML) development. You can write code, track experiments, visualize data, and perform debugging and monitoring within a single, integrated visual interface.
Amazon SageMaker Studio supports a single sign-on experience with AWS Single Sign-On (AWS SSO) authentication. External identity provider (IdP) such as Azure Active Directory and Okta Universal Directory can be integrated with AWS SSO to be the source of truth for Amazon SageMaker Studio. Users are given access to Amazon SageMaker Studio via a unique login URL that directly opens Amazon SageMaker Studio, and they can sign-in with their existing corporate credentials. Administrators can continue to manage users and groups in their existing identity systems which can then be synchronized with AWS SSO. For instance, AWS SSO enables administrators to connect their on-premises Active Directory (AD) or their AWS Managed Microsoft AD directory, as well as other Supported Identity Providers. For more information, see The Next Evolution in AWS Single Sign-On and Single Sign-On between Okta Universal Directory and AWS.
In this post, we walk you through setting up SSO with Amazon SageMaker Studio and enabling SSO with Okta Universal Directory. I also demonstrate the SSO experience for system administrators and Amazon SageMaker Studio users.
To use the same Okta user login for Amazon SageMaker Studio, you need to set up AWS SSO and connect to Okta Universal Directory. The high-level steps are as follows:
- Enable AWS SSO on the AWS Management Console. Create this AWS SSO account in the same AWS Region as Amazon SageMaker Studio.
- Add AWS SSO as an application Okta users can connect to.
- Configure the mutual agreement between AWS SSO and Okta, download IdP metadata in Okta, and configure an external IdP in AWS SSO.
- Enable identity synchronization between Okta and AWS SSO.
For instructions, see Single Sign-On between Okta Universal Directory and AWS.
This setup makes sure that when a new account is added to Okta and connected to the AWS SSO, a corresponding AWS SSO user is created automatically.
After you complete these steps, you can see the users assigned on the Okta console.
You can also see the users on the AWS SSO console, on the Users page.
Creating Amazon SageMaker Studio with AWS SSO authentication
We now need to create Amazon SageMaker Studio with AWS SSO as the authentication method. Complete the following steps:
- On the Amazon SageMaker console, choose Amazon SageMaker Studio.
- Select Standard setup.
- For Authentication method, select AWS Single Sign-On (SSO).
- For Permission, choose the Amazon SageMaker execution role.
If you don’t have this role already, choose Create role. Amazon SageMaker creates a new AWS Identity and Access Management (IAM) role with the AmazonSageMakerFullAccess policy attached.
- Optionally, you can specify other settings such as notebook sharing configuration, networking and storage, and tags.
- Choose Submit to create Amazon SageMaker Studio.
A few moments after initialization, the Amazon SageMaker Studio Control Panel appears.
- Choose Assign users.
The Assign users page contains a list of all the users from AWS SSO (synchronised from your Okta Universal Directory).
- Select the users that are authorized to access Amazon SageMaker Studio.
- Choose Assign users.
You can now see these users listed on the Amazon SageMaker Studio Control Panel.
On the AWS SSO console, under Applications, you can see the detailed information about the newly created Amazon SageMaker Studio.
In addition, you can view the assigned users.
Amazon SageMaker Studio also automatically creates a user profile with the domain execution role for each SSO user. A user profile represents a single user within a domain, and is the main way to reference a user for the purposes of sharing, reporting, and other user-oriented features such as allowed instance types. You can use the UpdateUserProfile API to associate a different role for a user, allowing fine-grained permission control so the user can pass this associated IAM role when creating a training job, hyperparameter tuning job, or a model. For more information about available Amazon SageMaker SDK API references, see Amazon SageMaker API Reference.
Using Amazon SageMaker Studio via SSO
As a user, you can start in one of three ways:
- Start from the Okta user portal page, select AWS SSO application, and choose Amazon SageMaker Studio
- Start from the AWS SSO user portal (the URL is on the AWS SSO Settings page), redirect to Okta login page, choose Amazon SageMaker Studio
- Bookmark the Amazon SageMaker Studio address (the URL is on the Amazon SageMaker Studio page), the page redirects automatically to Okta login page
For this post, we start in the AWS SSO user portal and are redirected to the Okta login page.
After you log in, you see an application named Amazon SageMaker Studio.
When you choose the application, the Amazon SageMaker Studio welcome page launches.
Now data scientists and ML builders can rely on this web-based IDE and use Amazon SageMaker to quickly and easily build and train ML models, and directly deploy them into a production-ready hosted environment. To learn more about the key features of Amazon SageMaker Studio, see Amazon SageMaker Studio Tour.
In this post, I showed how you can take advantage of the new AWS SSO capabilities to use Okta identities to open Amazon SageMaker Studio. Administrators can now use a single source of truth to manage their users, and users no longer need to manage an additional identity and password to sign in to their AWS accounts and applications.
AWS SSO with Okta is free to use and available in all Regions where AWS SSO is available. Amazon SageMaker Studio is now generally available in US East (Ohio), US East (N. Virginia), US West (Oregon), EU (Ireland) and China (Beijing and Ningxia), with additional Regions coming soon. Please read the product documentation to learn more.
About the Author
Yanwei Cui, PhD, is a Machine Learning Specialist Solution Architect at AWS. He started machine learning research at IRISA (Research Institute of Computer Science and Random Systems), and has several years of experience building artificial intelligence powered industrial applications in computer vision, natural language processing and online user behavior prediction. At AWS, he shares the domain expertise and helps customers to unlock business potentials, and to drive actionable outcomes with machine learning at scale. Outside of work, he enjoys reading and traveling.