Workflow environments in Amazon SageMaker Unified Studio
Use a shared workflow environment to share workflows with other project members. You have two options for setting up a workflow environment in your project:
Create a new workflow environment – Create a new Amazon MWAA environment that Amazon SageMaker Unified Studio provisions and manages for you. Use this option when you do not have an existing Amazon MWAA environment.
Connect an existing Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment – Connect an Amazon MWAA environment that you already manage in your AWS account. Use this option when you want to use an existing environment with Amazon SageMaker Unified Studio workflows.
To update or delete a workflow environment, you must be an owner of the project that the workflow environment is in. After a project owner creates or connects a workflow environment, any project member can sync their files to share them in the environment.
Create a workflow environment
To create a workflow environment, you must be an owner of the project that you want to create a workflow environment in.
To create a workflow environment, complete the following steps:
Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials.
Navigate to a project that was created with the Data analytics and AI-ML model development project profile. To do this, choose a project from the project selector dropdown at the top of the page.
In the left navigation pane, choose Compute.
On the Workflow environments tab, confirm that there are no workflow environments in the project yet. Then choose Create.
In the Create workflow environment window, review the parameters of the workflow environment. These are determined by your admin. If you want any of these parameters to change, contact your admin.
Choose Create workflow environment.
Note
Workflow environment creation takes several minutes to complete.
Connect an existing Amazon MWAA environment
You can connect an existing Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment to your Amazon SageMaker Unified Studio project. Use your existing MWAA environment to run and monitor workflows directly from Amazon SageMaker Unified Studio.
Prerequisites
Before you connect an existing Amazon MWAA environment, make sure that you meet the following requirements:
You are a project owner or project contributor in the project (managed in project members).
You have an existing Amazon MWAA environment in your AWS account.
The environment runs Airflow 2.x or later for running and monitoring workflows. To use the visual authoring experience (the Create workflow button in Workflows), Airflow 3 or later is required.
The MWAA environment execution role has the required IAM permissions to interact with Amazon SageMaker Unified Studio. Attach the following policy to the execution role of your MWAA environment:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "DataZoneAccess", "Effect": "Allow", "Action": [ "datazone:ListEnvironmentBlueprints", "datazone:ListEnvironments", "datazone:GetEnvironment" ], "Resource": "*" }, { "Sid": "SageMakerAndReadActions", "Effect": "Allow", "Action": [ "ec2:DescribeInstanceTypes", "ssm:GetParameter", "sagemaker:AddTags", "sagemaker:ListTags", "sagemaker:CreateTrainingJob", "sagemaker:DescribeTrainingJob" ], "Resource": "*" }, { "Sid": "PassRoleToSageMaker", "Effect": "Allow", "Action": "iam:PassRole", "Resource": "arn:aws:iam::<account-id>:role/<project-role-name>", "Condition": { "StringEquals": { "iam:PassedToService": "sagemaker.amazonaws.com" } } } ] }Replace
<account-id>with your AWS account ID and<project-role-name>with the name of your SageMaker Unified Studio project role.
Configure your MWAA environment for Amazon SageMaker Unified Studio
You must add Airflow configuration options to your MWAA environment so that it can connect to your Amazon SageMaker Unified Studio project.
Open the Amazon MWAA console and navigate to your environment.
Choose Edit to edit the environment configuration.
In the Airflow configuration options section, add the following three key-value pairs:
workflows.datazone_domain_id– The ID of your DataZone domain.workflows.datazone_domain_region– The region of your DataZone domain (for example,us-west-2).workflows.datazone_project_id– The ID of your DataZone project.
Choose Save.
Wait for the environment status to change to Available before proceeding.
Connect the environment in Amazon SageMaker Unified Studio
After you configure your MWAA environment, connect it to your Amazon SageMaker Unified Studio project.
Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials.
Navigate to a project that was created with the Data analytics and AI-ML model development project profile. To do this, choose a project from the project selector dropdown at the top of the page.
In the left navigation pane, choose Compute.
On the Workflow environments tab, choose Connect.
Choose the MWAA environment that you configured in the preceding steps.
Choose Connect workflow environment.
Update a workflow environment
To update a workflow environment, you must be an owner of the project that you want to update a workflow environment in.
To update a workflow environment, complete the following steps:
Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials.
Navigate to the project that contains the workflow environment that you want to update. To do this, choose a project from the project selector dropdown at the top of the page.
In the left navigation pane, choose Compute.
On the Workflow environments tab, expand the Actions menu and choose Update.
Choose Update workflow environment.
Note
Updating a workflow environment takes several minutes to complete.
Delete a workflow environment
To delete a workflow environment, you must be an owner of the project that contains the workflow environment that you want to delete.
To delete a workflow environment, complete the following steps:
Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials.
Navigate to the project that contains the workflow environment that you want to delete. To do this, choose a project from the project selector dropdown at the top of the page.
In the left navigation pane, choose Compute.
On the Workflow environments tab, expand the Actions menu and choose Delete.
Confirm the action by typing
confirm, then choose Delete workflow environment.
Note
Deleting a workflow environment takes several minutes to complete.