

# Getting started
<a name="getting-started"></a>

The following getting started topics apply to setting up SageMaker Unified Studio unified domains configured with AWS IAM Identity Center. For more details, see [Domains in Amazon SageMaker Unified Studio](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/working-with-domains.html).

The information in this section helps you get started using Amazon SageMaker Unified Studio. If you are new to Amazon SageMaker Unified Studio, start by becoming familiar with the concepts and terminology presented in [Amazon SageMaker Unified Studio terminology and concepts](concepts.md).

To get started with Amazon SageMaker Unified Studio as a user, start by gaining access to Amazon SageMaker Unified Studio and creating a project. You can then add members to the project and use the sample JupyterLab notebook to begin building with a variety of tools and resources.

**Topics**
+ [

# Access Amazon SageMaker Unified Studio
](getting-started-access-the-portal.md)
+ [

# Create a project
](getting-started-create-a-project.md)
+ [

# Get started with Amazon Bedrock in SageMaker Unified Studio
](getting-started-use-amazon-bedrock-ide.md)
+ [

# Get started with the query editor in Amazon SageMaker Unified Studio
](getting-started-querying.md)
+ [

# Get started adding on-demand Amazon EMR on EC2 instances
](getting-started-emr-ec2-page.md)
+ [

# Use the sample notebook
](getting-started-use-sample-notebook.md)
+ [

# Getting started with Amazon Q Developer generative AI chat and command line tools
](qdeveloper-integration.md)

# Access Amazon SageMaker Unified Studio
<a name="getting-started-access-the-portal"></a>

For you to get started with Amazon SageMaker Unified Studio, your admin must create a domain in the Amazon SageMaker Unified Studio console and provide you with a URL. For more information, see the Amazon SageMaker Unified Studio Administrator Guide.

When you have the URL from your admin, you can sign in to Amazon SageMaker Unified Studio in one of the following ways:
+ By using your AWS IAM credentials. For more information, see [Sign up for an AWS account](#getting-started-sign-up).
+ If your admin has configured single sign-on (SSO) access, you can also sign in to Amazon SageMaker Unified Studio using SSO credentials that you configure with IAM Identity Center or through an identity provider. For more information, see [Configure SSO credentials with IAM Identity Center](#set-up-SSO-IDC).

**Note**  
 Amazon SageMaker Unified Studio supports the following browsers:   


| Browser | Version | 
| --- | --- | 
|  Microsoft Edge  |  Latest 3 major versions  | 
|  Google Chrome  |  Latest 3 major versions  | 
|  Apple Safari  |  Latest 3 major versions  | 
JupyterLab IDE requires third-party cookies to be allowed in your Amazon SageMaker Unified Studio domain. For more information, see [Invalid or expired auth token when accessing an IDE](troubleshooting-issues.md#invalid-auth-token-ide).

## Configure credentials
<a name="getting-started-configure-credentials"></a>

If you want to sign in to Amazon SageMaker Unified Studio using AWS IAM user or SSO credentials using IAM Identity Center, follow the instructions in the optional prerequiste sections below.

**Note**  
You only need one method to sign in to Amazon SageMaker Unified Studio. If you have already configured an AWS account or SSO credentials that work with the domain URL you received from your admin, you can skip the steps in this section.

**Topics**
+ [

### Sign up for an AWS account
](#getting-started-sign-up)
+ [

### Configure SSO credentials with IAM Identity Center
](#set-up-SSO-IDC)

### Sign up for an AWS account
<a name="getting-started-sign-up"></a>

If you do not have an AWS account, complete the following steps to create one.

1. Open [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).

1. Follow the online instructions.

When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, [assign administrative access to an administrative user](https://docs.aws.amazon.com/singlesignon/latest/userguide/getting-started.html), and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks).

### Configure SSO credentials with IAM Identity Center
<a name="set-up-SSO-IDC"></a>

You can use SSO with IAM Identity Center or with an identity provider. To use SSO with IAM Identity Center, work with your admin to get added to their IAM Identity Center directory and set up your SSO credentials.

The process is as follows:

1. After your admin adds your user information to their IAM Identity Center directory, you receive an email with your username and configuration instructions for single sign-on (SSO). Use the link in the email to set your password for SSO.

1. Your admin creates configurations and adds you to a domain using the Amazon SageMaker Unified Studio console. They then copy the link to that domain from the Amazon SageMaker Unified Studio console and send it to you. Use the domain URL from your admin to navigate to Amazon SageMaker Unified Studio.

1. Sign in to Amazon SageMaker Unified Studio with the SSO username and password that you configured in step 1.

1. If your admin's IAM Identity Center is configured to require multi-factor authentication (MFA), set up and use an MFA device. Follow the instructions on the screen to register or use an MFA device as needed, or contact your admin for support. For more information about MFA device enforcement, see [Configure MFA device enforcement](https://docs.aws.amazon.com/singlesignon/latest/userguide/how-to-configure-mfa-device-enforcement.html) in the IAM Identity Center User Guide.

You are then able to view Amazon SageMaker Unified Studio landing page, where you can create new projects and view projects that you have been added to.

# Create a project
<a name="getting-started-create-a-project"></a>

In Amazon SageMaker Unified Studio, projects enable a group of users to collaborate on various business use cases. Within projects, you can manage data assets in the Amazon SageMaker Unified Studio catalog, perform data analysis, organize workflows, develop machine learning models, build generative AI apps, and more. 

In order to create a project in Amazon SageMaker Unified Studio, you must gain access to Amazon SageMaker Unified Studio. A domain unit owner must also grant you access to create projects through an authorization policy. For more information, see [Domain units and authorization policies in Amazon SageMaker Unified Studio](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/domain-units.html).

1. Navigate to the Amazon SageMaker Unified Studio landing page using the URL from your admin.
**Note**  
 Amazon SageMaker Unified Studio supports the following browsers:       
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/getting-started-create-a-project.html)

1. Access Amazon SageMaker Unified Studio using your IAM or single sign-on (SSO) credentials. For more information, see [Access Amazon SageMaker Unified Studio](getting-started-access-the-portal.md).

1. Choose **Create project**.

1. Enter a name for your project. The name of the project is final.

1. (Optional) Enter a description for your project. You can edit this later.

1. (Optional) If your domain has configured domain units, select a domain unit for your project. If nobody in the domain has created domain units, you create a project in the root domain unit by default and no action is needed here.

1. Select the project profile that contains the resources you will need in your project.

   1. Select **All capabilities** to access all of the supported services and resources in a single project.

   1. Select **SQL analytics** to get started querying and analyzing SQL data.

   1. Select **Generative AI application development** to get started with generative AI.

1. Choose **Continue**.

1. (Optional) Customize parameters, if desired. For more information about customizing parameters, see [Step 2: Customize parameters](create-new-project.md#create-project-parameters).

1. Choose **Continue**.

1. Choose **Create project**.

You can then navigate to your project at any time from the Amazon SageMaker Unified Studio home page by choosing **Select a project** and **Browse all projects**, then choosing the name of your project. After you navigate to your project, you can begin adding data and compute resources and using tools.

# Get started with Amazon Bedrock in SageMaker Unified Studio
<a name="getting-started-use-amazon-bedrock-ide"></a>

Get started with Amazon Bedrock in SageMaker Unified Studio by experimenting with a model in a [playground](bedrock-playgrounds.md).

The Amazon Bedrock in SageMaker Unified Studio playgrounds that lets you easily experiment with Amazon Bedrock models. The [chat](bedrock-explore-chat-playground.md) playground lets you chat with a model by providing text and image prompts to the model (not all models support images). The [image and video](explore-image-playground.md) playground lets you generate images and videos with a suitable model. With both playgrounds you can experiment by making configuration changes. For example, you can influence the response from a model by changing [inference](explore-prompts.md#inference-parameters) parameters.

After trying the chat and image playgrounds, you can try creating a chat agent app or flows app. A chat agent app allows users to chat with an Amazon Bedrock model through a conversational interface, typically by sending prompts (text or image) and receiving responses. To create a chat agent app, see [Build a chat agent app with Amazon Bedrock](create-chat-app.md).

You can also create a [flows app](create-flows-app.md) that lets you visually design the flow of an app.

## Chat with a model in the chat playground
<a name="getting-started-use-amazon-bedrock-ide-playground"></a>

In these instructions, you use the Amazon Bedrock in SageMaker Unified Studio chat playground to chat with an Amazon Bedrock in SageMaker Unified Studio model. You chat by sending a prompt to the model and answering the response that the model generates. For more information, see [Experiment with the Amazon Bedrock playgrounds](bedrock-playgrounds.md).

If you don't have access to a model, contact your administrator.

**To chat with a model**

1. Navigate to the Amazon SageMaker Unified Studio landing page by using the URL from your administrator.

1. Access Amazon SageMaker Unified Studio using your IAM or single sign-on (SSO) credentials. For more information, see [Access Amazon SageMaker Unified Studio](getting-started-access-the-portal.md).

1. At the top of the page, choose the **Discover**.

1. In the **Generative AI** section, choose **Chat playground** to open the chat playground.  
![\[Open Amazon Bedrock in SageMaker Unified Studio chat playground.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/bedrock/bedrock-ide-discover.png)

1. In **Type** select **Model** and then select a model to use in **Model**. For full information about the model, choose **View full model details** in the information panel. For more information, see [Find serverless models with the Amazon Bedrock model catalog](model-catalog.md). If you don't have access to an appropriate model, contact your administrator. Different models might not support all features.

1. In the **Enter prompt** text box, enter **What is Avebury stone circle?**.

1. (Optional) If the model you chose is a reasoning model, you can choose **Reason** to have the model include its reasoning in the reponse. For more information, see [Enhance model responses with model reasoning](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-reasoning.html) in the *Amazon Bedrock user guide*.

1. Press Enter on your keyboard, or choose the run button, to send the prompt to the model. Amazon Bedrock in SageMaker Unified Studio shows the response from the model in the playground.  
![\[Run prompt in Amazon Bedrock in SageMaker Unified Studio chat playground.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/bedrock/bedrock-ide-chat-playground-run-prompt.png)

1. Continue the chat by entering the prompt **Is there a museum there?** and pressing Enter. 

   The response shows how the model uses the previous prompt as context for generating its next response.

1. Choose **Reset** to start a new chat with the model.

1. Influence the model response by doing the following:

   1. Enter and run a prompt. Note the response from the model.

   1. Choose the configurations menu to open the **Configurations** pane.  
![\[Inference parameters in Amazon Bedrock in SageMaker Unified Studio chat playground.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/bedrock/bedrock-ide-chat-playground-inference.png)

   1. Influence the model response by making [inference parameters](explore-prompts.md#inference-parameters) changes.

   1. (Optional) In **System instructions**, enter any overarching system instructions that you want the model to apply for future interactions.

   1. Run the prompt again and compare the response with the previous response. 

1. Choose **Reset** to start a new chat with the model.

1. Try sending an image to a model by doing the following:

   1. For **Model**, choose a model that supports [images](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html).

   1. Choose the attachment button at the left of the **Enter prompt** text box.   
![\[Run prompt in Amazon Bedrock in SageMaker Unified Studio chat playground.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/bedrock/bedrock-ide-chat-playground-run-prompt-attach.png)

   1. In the open file dialog box, choose an image from your local computer.

   1. In the text box, next to the image that you uploaded, enter **What's in this image?**. 

   1. Press Enter on your keyboard enter to send the prompt to the model. The response from the models describes the model or image.

1. (Optional) Try using another model and different prompts. Different models have different recommendations for creating, or engineering, prompts. For more information, see [Prompt engineering guides](explore-prompts.md#prompt-guides).

1. (Optional) Compare the output from multiple models, or [shared apps](bedrock-explore-chat-playground-app.md).

   1. In the playground, turn on **Compare mode**.

   1. In both panes, select the model that you want to compare. If you want to use a shared app, select **App** in **Type** and then select the app in **App**.

   1. Enter a prompt in the text box and run the prompt. The output from each model is shown. You can choose the copy icon to copy the prompt or model response to the clipboard.

   1. (Optional) Choose **View configs** to make configuration changes, such as [inference parameters](explore-prompts.md#inference-parameters). Choose **View chats** to return to the chat page.

   1. (Optional) Choose **Add chat window** to add a third window. You can compare up to 3 models or apps.

   1. Turn off **Compare mode** to stop comparing models.

# Get started with the query editor in Amazon SageMaker Unified Studio
<a name="getting-started-querying"></a>

You can use the query editor to perform analysis using SQL. The query editor tool provides a place to write and run queries, view results, and share your work with your team.

## Prerequisites
<a name="start-querying-prerequisites"></a>

Before you get started with the query editor, you must access Amazon SageMaker Unified Studio and create a project with the **SQL analytics** project profile.

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials. 

   For more information, see [Access Amazon SageMaker Unified Studio](getting-started-access-the-portal.md).

1. Create a project with a **SQL analytics** project profile. This project profile sets up your project with access to Amazon Redshift Serverless and Amazon Athena resources. For more information, see [Create a new project](create-new-project.md).

## Query sample data using Amazon Athena in Amazon SageMaker Unified Studio
<a name="start-querying-create-with-athena"></a>

After you create a project, you can use the query editor to write and run queries.

1. Navigate to the project you created in the top center menu of the Amazon SageMaker Unified Studio home page.

1. Expand the **Build** menu in the top navigation bar, then choose **Query editor**.

1. Create a new querybook tab. A querybook is a kind of SQL notebook where you can draw from multiple engines to design and visualize data analytics solutions.

1. Select a data source for your queries by using the menu in the upper-right corner of the querybook.

   1. Under **Connections**, choose **Athena (Lakehouse)** to connect to your Lakehouse resources.

   1. Under **Catalogs**, choose **AwsDataCatalog**.

   1. Under **Databases**, choose the name of the AWS Glue database. This database was created for use when the project was created.

1. Choose **Choose** to connect to the database and query engine.

1. Copy the following SQL query into the querybook cell to create a table in the database.

   ```
   CREATE TABLE mkt_sls_table AS
   SELECT 146776932 AS ord_num, 23 AS sales_qty_sld, 23.4 AS wholesale_cost, 45.0 as lst_pr, 43.0 as sell_pr, 2.0 as disnt, 12 as ship_mode,13 as warehouse_id, 23 as item_id, 34 as ctlg_page, 232 as ship_cust_id, 4556 as bill_cust_id
   UNION ALL SELECT 46776931, 24, 24.4, 46, 44, 1, 14, 15, 24, 35, 222, 4551
   UNION ALL SELECT 46777394, 42, 43.4, 60, 50, 10, 30, 20, 27, 43, 241, 4565
   UNION ALL SELECT 46777831, 33, 40.4, 51, 46, 15, 16, 26, 33, 40, 234, 4563
   UNION ALL SELECT 46779160, 29, 26.4, 50, 61, 8, 31, 15, 36, 40, 242, 4562
   UNION ALL SELECT 46778595, 43, 28.4, 49, 47, 7, 28, 22, 27, 43, 224, 4555
   UNION ALL SELECT 46779482, 34, 33.4, 64, 44, 10, 17, 27, 43, 52, 222, 4556
   UNION ALL SELECT 46779650, 39, 37.4, 51, 62, 13, 31, 25, 31, 52, 224, 4551
   UNION ALL SELECT 46780524, 33, 40.4, 60, 53, 18, 32, 31, 31, 39, 232, 4563
   UNION ALL SELECT 46780634, 39, 35.4, 46, 44, 16, 33, 19, 31, 52, 242, 4557
   UNION ALL SELECT 46781887, 24, 30.4, 54, 62, 13, 18, 29, 24, 52, 223, 4561
   ```

1. Choose the **Run cell** icon. ![\[The chart icon used in the Amazon SageMaker Unified Studio query editor.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/qev2/qev2-run.png)

   When the query finishes running, a **Result** tab appears below the cell to display the outcome.

1. Refresh the **Data explorer** navigation pane, and view the table you created in the **Lakehouse** section.

1. Choose **Add SQL** to add another cell to the querybook. Then enter the following script:

   ```
   select * from mkt_sls_table limit 10
   ```

1. Choose the **Run cell** icon.

   In the **Results** tab, the first ten rows of the table you created are displayed.

1. Choose **Add SQL** to add another cell to the querybook. Then enter the following script:

   ```
   select item_id, sales_qty_sld 
   from mkt_sls_table 
   where sales_qty_sld > 30
   ```

1. Choose the **Run cell** icon.

   In the **Results** tab, only data that fulfills the specified requirements is displayed.

1. In the **Results** tab, choose the **Chart view** icon. ![\[The chart icon used in the Amazon SageMaker Unified Studio query editor.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/qev2/qev2-chart.png)

   This opens up a chart view with a line graph as a default.

1. Set up the chart to display a pie chart.

   1. For **Type**, choose **Pie**.

   1. For **Values**, choose **sales\$1qty\$1sold**.

   1. For **Labels**, choose **item\$1id**.

   This displays a pie chart so you can visualize results.

After you've finished querying the data, you can choose to view the queries in your query history and save them to share with other project members.
+ For more information about reviewing query history, see [Review query history](query-history.md).
+ For more information about other operations you can do with the query editor, such as using generative AI to create SQL queries, see [SQL analytics](sql-query.md).

# Get started adding on-demand Amazon EMR on EC2 instances
<a name="getting-started-emr-ec2-page"></a>

## Overview
<a name="getting-started-emr-ec2-overview"></a>

 [Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html) on EC2 is a managed big data platform that simplifies running distributed data processing frameworks like Apache Spark, Hadoop, and Hive on [Amazon EC2 instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html). Amazon EMR handles the complexities of cluster provisioning, configuration, and scaling, allowing you to focus on your data processing tasks. For more details on Amazon EMR, visit the [Amazon EMR webpage](https://aws.amazon.com/emr/). 

 The Amazon EMR on EC2 integration with Amazon SageMaker Unified Studio streamlines your data analytics workflow, giving you a unified data and compute experience. This integration lets you easily access and create Amazon EMR clusters alongside other data tools in a single interface. You can organize Amazon EMR resources within Amazon SageMaker Unified Studio projects, connect Amazon EMR workloads with your data catalog, and provision clusters on-demand. With this integration, you can experiment by creating and terminating Amazon EMR clusters as needed, optimizing costs while maintaining a cohesive data experience. 

 With the help of this getting started guide you will be able to configure Amazon EMR cluster settings for EC2 deployment and launch Amazon EMR clusters. 

## Prerequisites
<a name="getting-started-emr-ec2-prerec"></a>

You must complete the following procedure through the AWS management console to create an Amazon EMR on EC2 in an Amazon SageMaker Unified Studio project.

### Set up Amazon SageMaker Unified Studio
<a name="getting-started-emr-ec2-set-up"></a>

 Before you get started with creating an Amazon EMR on EC2, you must access Amazon SageMaker Unified Studio and create a project with the **All capabilities** project profile. 

1.  If you haven't created an Amazon SageMaker Unified Studio domain, follow the steps in [Create a Amazon SageMaker Unified Studio domain - quick setup ](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/create-domain-sagemaker-unified-studio-quick.html). 

1. To access Amazon SageMaker Unified Studio:

   1. Open the Amazon SageMaker Unified Studio console at [https://console.aws.amazon.com/sagemaker/.](https://console.aws.amazon.com/sagemaker/) 

   1. Choose **Studio**.

   1. Choose **Open Studio**.

   1. Sign in using your SSO or AWS credentials. For more information, see [Access Amazon SageMaker Unified Studio](getting-started-access-the-portal.md).

1. Create a project with the **All capabilities** profile:

   1. In Amazon SageMaker Unified Studio, choose the **Projects** icon in the left sidebar.

   1. Choose **Create project**.

   1. Select the **All capabilities** project profile.

   1. Follow the prompts to complete project creation.

   1. This profile grants you access to Amazon EMR resources. For more information, see [Create a project](getting-started-create-a-project.md). 

### PEM certificate configuration
<a name="getting-started-emr-ec2-pem-cert"></a>

1. Create a PEM certificate, which saves your ZIP file on your local machine:

   1. Open your terminal on your local machine.

   1. The following commands demonstrate how to use [OpenSSL](https://www.openssl.org/) to generate a self-signed X.509 certificate with a 2048-bit RSA private key. Consider changing `us-west-2` to the region you are using throughout this tutorial. Other optional subject items such as country (C), state (S), and Locale (L), are specified. 
**Important**  
This example is a proof-of-concept demonstration only. Using self-signed certificates is not recommended and presents a potential security risk. For production systems, use a trusted certification authority (CA) to issue certificates. For more information see [Providing certificates for encrypting data in transit with Amazon EMR encryption](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-encryption-enable.html#emr-encryption-certificates).

      ```
      $ openssl req -x509 -newkey rsa:2048 -keyout privateKey.pem -out certificateChain.pem -days 365 -nodes -subj '/C=US/ST=Washington/L=Seattle/O=MyOrg/OU=MyDept/CN=*.us-west-2.compute.internal'
      $ cp certificateChain.pem trustedCertificates.pem
      $ zip -r -X my-certs.zip certificateChain.pem privateKey.pem trustedCertificates.pem
      ```

1. Upload the PEM certificate ZIP file to an Amazon S3 bucket:

   1. Open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

   1. Under **General purpose buckets**, choose your amazon-sagemaker bucket.

   1. Navigate to your domain folder. For multiple domains, locate the folder matching your Domain ID. You can find your Domain ID in the **project details** tab of Amazon SageMaker Unified Studio.

   1. Choose **Create folder** and enter **certificate\$1location** as the folder name. You do not need to specify an encryption key during folder creation. 
**Note**  
The name **certificate\$1location** is required for this folder and cannot be customized.

   1. Select your new folder to open it.

   1. Under **Objects**, select **Upload** and **Add files**. Select your PEM certificate ZIP file (named "my-certs.zip") from your local machine, then choose **Upload**.

   1. Select the uploaded ZIP file and choose **Copy S3 URI**. You'll need this location value in step 3.

1. Specify your certificate location in Amazon SageMaker Unified Studio, following the instructions in [ Specify PEM certificate for EmrOnEc2 blueprint](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/blueprints.html#enable-emr-on-ec2-blueprint).

## Creating your Amazon EMR cluster
<a name="getting-started-emr-ec2-create"></a>

1. In Amazon SageMaker Unified Studio, choose your project to enter the project overview page and select **Compute** from the navigation bar.

1. In the **Compute** panel, select the **Data processing** tab.

1. To create a new Amazon EMR on EC2 cluster choose **Add compute**.

1. In the **Add compute** modal, you can select the type of compute you would like to add to your project. Select **Create new compute resources**.

1. Select **Amazon EMR on EC2 cluster** and choose **Next**.

1. The **Add compute** dialog box allows you to specify the name of the Amazon EMR on EC2 cluster. Default settings for the Amazon EMR are fine. Choose your EMR configuration according to your choice from the prerequisites. 

1. After configuring any settings if you choose, select **Add compute**. After some time, your Amazon EMR on EC2 cluster will be added to your project.

# Use the sample notebook
<a name="getting-started-use-sample-notebook"></a>

You can get started using Amazon SageMaker Unified Studio by using the sample notebook in the JupyterLab IDE within your project. This getting\$1started.ipynb notebook provides information about using AWS Glue, Amazon Redshift, Amazon Athena, and more. This is a multi-service, poly-compute notebook, designed to enable end-to-end development in a single notebook.

In an Amazon SageMaker Unified Studio notebook, you can select the language and framework for each cell based on the compute options or connections configured in your project. You can add or modify these compute connections from the project's compute management screen. The compute choices differ based on your project’s profile. However, all default profiles come with local Python, serverless Spark powered by AWS Glue, and Trino with Amazon Athena. There is a README file with additional information about the sample notebook and Amazon SageMaker Unified Studio.

You can also create new notebooks to input new code from scratch. For more information about using the JupyterLab IDE in Amazon SageMaker Unified Studio, see [Using the JupyterLab IDE in Amazon SageMaker Unified Studio](jupyterlab.md).

To navigate to the sample notebook, complete the following steps:

1. Navigate to Amazon SageMaker Unified Studio using the URL from your admin and log in using your SSO or AWS credentials. 

1. Navigate to a project. To do this, choose **Select project** from the center menu.

1. Expand the **Build** menu, then choose **JupyterLab**.

# Getting started with Amazon Q Developer generative AI chat and command line tools
<a name="qdeveloper-integration"></a>

**Note**  
Powered by Amazon Bedrock: Amazon Q Developer is built on Amazon Bedrock and includes [automated abuse detection](https://docs.aws.amazon.com/bedrock/latest/userguide/abuse-detection.html) implemented in Amazon Bedrock to enforce safety, security, and the responsible use of AI.

In this Getting Started procedure, you will use Amazon SageMaker Unified Studio, SageMaker Catalog, Sagemaker Lakehouse sample data, and Amazon Q Developer generative AI tools to analyze code in the JupyterLab IDE. The Amazon Q Developer tools include Q chat and Q CLI. 

Amazon Q Developer provides an agentic chat feature supporting read and write operations in the notebook (Code Editor, JupyterLab) with workspace context awareness. With Amazon Q chat, you can chat about AWS services, your development project, your data pipelines, and related topics. The Amazon Q CLI provides intelligent, contextual assistance for error debugging and development tasks, and it can run complex command line tasks for you.

**Warning**  
Generative AI may give inaccurate responses. Avoid sharing sensitive information. Chats may be visible to others in your organization.

For reference information about implementing Amazon Q Developer in Amazon SageMaker Unified Studio, see [Using Amazon Q Developer with Amazon SageMaker Unified Studio](q-actions.md).

**Topics**
+ [

## Discover Amazon Q Developer in Amazon SageMaker Unified Studio
](#qdeveloper-integration-overview)
+ [

## Considerations for using the Amazon Q Developer feature
](#qdeveloper-integration-considerations)
+ [

## Prerequisites for using the Amazon Q Developer feature
](#qdeveloper-integration-prerequisites)
+ [

# Getting started using Q chat
](qdeveloper-integration-start-chat.md)
+ [

# Getting started with Q CLI
](qdeveloper-integration-start-CLI.md)

## Discover Amazon Q Developer in Amazon SageMaker Unified Studio
<a name="qdeveloper-integration-overview"></a>

You can use Agentic AI tools through Amazon Q Developer tools that use context and agents to summarize, analyze, perform tasks, and work on your code with you. In your JupyterLab notebook or Code Editor, you can use the Amazon Q chat and Amazon Q CLI tools to understand and configure your Amazon SageMaker Unified Studio project files. For more information about Amazon Q Developer, see [What is Amazon Q Developer](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/what-is.html) in the *Amazon Q Developer User Guide*.

## Considerations for using the Amazon Q Developer feature
<a name="qdeveloper-integration-considerations"></a>

The following considerations apply for working with Amazon Q Developer in Amazon SageMaker Unified Studio.
+ For Q CLI, for domains using the Amazon Q Free Tier, you will be automatically logged in. For domains using the Amazon Q Pro Tier, you will be prompted to login. You can use the AWS access portal URL (also called the Start URL) associated with the IAM Identity Center login attached to the domain and the IDC region for login. Q CLI will then use the profile and subscription the admin creates following the steps detailed in [Enable Amazon Q Developer Pro](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/amazonq.html#amazonq-enable).
**Note**  
If there is only one profile set up, then that is the profile that Q CLI will use. If there are multiple profiles set up, then Q CLI prompts you to choose one. Choose the profile associated with the domain.
+ When you enable Amazon Q, you can choose between the Free or Pro tiers of the service. JupyterLab in the default space supports both the free and paid tiers. However, in additional spaces, JupyterLab and Code Editor support the Free Tier only.
+ The level of use for the Q chat and Q CLI are set by the tier availability as detailed on the pricing page at [Amazon Q Developer Pricing](https://aws.amazon.com/q/developer/pricing/).

**Note**  
When using the Free Tier, request limits are shared at the account level, meaning that one customer can potentially use up all requests. The Pro Tier of Amazon Q is charged at the user level, with limits set at the user level as well. The Pro Tier also lets you manage users and policies with enterprise access control.

## Prerequisites for using the Amazon Q Developer feature
<a name="qdeveloper-integration-prerequisites"></a>

The following prerequisities are required for this getting started procedure.
+ You must have access to a SageMaker Unified Studio domain and project. Create a project with an **All capabilities** project profile. This project profile sets up your project with access to S3 and Athena resources. For more information, see [Projects](projects.md).
+ To use the Amazon Q Developer chat and CLI features in Amazon SageMaker Unified Studio feature, you need access to a domain where Amazon Q Developer is configured. 

  If the domain is set to use the Free Tier, you will have access to Q chat and Q CLI in JupyterLab without any additional login. For the Pro Tier, your administrator must set up a profile, subscribe users, and attach the profile to the Amazon SageMaker Unified Studio domain. In Q CLI, you can then use the start URL and IDC region to sign in with a Pro Tier license. See [Enable Amazon Q Developer Pro](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/amazonq.html#amazonq-enable).

  For more information, see [Using the coding assistant](using-the-coding-assistant.md).

# Getting started using Q chat
<a name="qdeveloper-integration-start-chat"></a>

Use Q chat as follows. Make sure you are signed in with an ID that is configured for Q chat access.

1. Log in to your AWS account and navigate to the access portal, such as with your SSO login.

   Open the SageMaker Unified Studio console through the access portal, and then navigate to your project.

1. Open a Jupyter notebook by choosing **Build**, and then choosing **JupyterLab**. A Jupyter notebook cell page opens.

1. Choose the icon on the left for Q chat with Amazon Q Developer. If this is the first time, a message displays for you to acknowledge the AWS policies for responsible AI.   
![\[An image of the Q chat icon.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat_icon.png)

1. Keep the toggle for **Agentic coding** ON.

1. Type questions to interact with Q chat. Type over the **Ask a question... ** line.

You can get started using Q chat with the following examples.

## Example 1: Ask for information about your project
<a name="qdeveloper-integration-chat-exampleinfo"></a>

This example shows how Q chat can provide context aware responses for your project resources.

1. To open JupyterLab, choose **Build**, and then choose **JupyterLab**. If you are in JupyterLab, you can chat with Q with additional Amazon Q chat contextual awareness. 

1. In the Q chat field, enter the following.

   ```
   Can you tell me about my project?
   ```

   The response returns where Q asks follow-up questions and shows your files.

## Example 2: Create and run a data pipeline
<a name="qdeveloper-integration-chat-examplepipeline"></a>

This example shows how Q chat can perform complex tasks for you, such as creating and running a data pipeline in your project.

1. To open JupyterLab, choose **Build**, and then choose **JupyterLab**. If you are in JupyterLab, you can chat with Q with additional Amazon Q chat contextual awareness. 

1. In the Q chat field, enter the following.

   ```
   Can you help me set up and run a data pipeline?
   ```

   The following diagram shows the response.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-1.png)

   The following image shows Q asking questions and explaining the task.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-2.png)

   The following image shows Q creating the shell file for you in your workspace.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-4.png)

   The following image shows Q creating the files and describing them.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-5.png)

   The following image shows Q providing the instructions to run the pipeline.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-6.png)

   The following image shows the notebook file that Q created for you in your workspace.  
![\[An example response.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_chat-pipeline-notebook.png)

1. 

**Get access to data**

   Before visualizing data, you might need to request access to the data by subscribing to data in Amazon SageMaker Catalog.

1. 

**Create new connections**

   You can create connections directly to Amazon Redshift and other third party sources like Oracle and Snowflake from Amazon SageMaker Unified Studio. You configure connection details and credentials securely, and you can manage them within the project. For detailed steps, see [Amazon Redshift compute connections](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/compute-redshift.html) and [Data connections in lakehouse architecture](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/lakehouse-data-connection.html).

# Getting started with Q CLI
<a name="qdeveloper-integration-start-CLI"></a>

Use Q CLI as follows. Make sure you are signed in with an ID that is configured for Q CLI access. For more information about signing up, see [About signing up](q-actions.md#q-actions-aboutsignup).

1. Log in to your AWS account and navigate to the access portal, such as with your SSO login.

   Open the SageMaker Unified Studio through the access portal, and then navigate to your project.

1. Open a Jupyter notebook by choosing **Build, **and then choosing **JupyterLab**. Choose the icon for the python or console interface. A Jupyter notebook cell page opens.

1. Open a terminal window by choosing **New**, and then **Terminal**.

1. Type the following to open Q CLI.

   ```
   q chat
   ```

You can get started using Q CLI with the following examples.

## Example 1: Create a Glue table and create a python notebook for analysis
<a name="qdeveloper-integration-CLI-exampletable"></a>

This example shows how Q CLI can perform complex command line procedures for you, such as creating and visualizing data for a sample python notebook for a data engineer analyzing a Glue table in your project Lakehouse sample data source.

1. Download the diabetic data sample data set from the [sample data](https://archive.ics.uci.edu/dataset/296/diabetes+130-us+hospitals+for+years+1999-2008) site.

1. Create a new Glue table named `diabetic_data` and add the sample data that you just downloaded as a data source. Choose **Create table**. A schema shows for the sample table.  
![\[An image of the Add data screen\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_cli_notebook-1.png)

1. In the terminal for Q CLI, enter the following.

   ```
   You are a machine learning engineer, and you are working with data from the data engineer. Your responsibility is to analyze the output data in your notebook. Can you help me to create a python notebook for the following.
   		- Use the diabetic_data dataset in SageMaker Lakehouse.
   		- Create a notebook to perform typical data engineering tasks for the machine learning experience in JupyterLab.
   		- Make sure to handle missing values, perform descriptive analysis, feature analysis
                 - Create a comprehensive README.md file
   ```

   The following diagram shows the response where Q CLI asks questions and creates sample files.  
![\[An example image with the terminal window Q CLI page.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_cli_notebook-2.png)

1. The following diagram shows the response where Q CLI interacts with you while creating the files.  
![\[An example image with the terminal window Q CLI page.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_cli_notebook-3.png)

1. The following diagram shows the response where Q CLI provides the outline and description of what will be created.  
![\[An example image with the terminal window Q CLI page.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_cli_notebook-4.png)

1. The following diagram shows the response where Q CLI summarizes the files and their purpose.  
![\[An example image with the terminal window Q CLI page.\]](http://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/images/q-dev/q_cli_notebook-5.png)

## Example 2: Ask Q CLI to list project information
<a name="qdeveloper-integration-CLI-examplefunction"></a>

This example shows how Q CLI can provide context aware and complex command line help for your projects and data.
+ In the terminal, enter the following.

  ```
  Can you tell me my project and domain information?
  ```

  The response provides you with project information.