Skip to content

Conversation

@Will-ShaoHua
Copy link
Contributor

Problem

Solution


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

aws-toolkit-automation and others added 30 commits July 7, 2025 17:12
## Problem
- DeepLink remote connections should be able to reconnect automatically
when the connection drops.

## Solution
- Reintroduced and updated logic to handle DeepLink reconnection by
redirecting the user to the Studio UI to refetch the session token.

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem
When persisting selected domains/users that the customer manually
filtered, we did not take into account the region that the customer was
operating in. Thus, the filtering mechanism was incorrectly being
applied to all regions.
Example:
```
[
  [
    'arn:aws:iam:user/user1',
    ['domain1__pdx-1', 'domain1__pdx-2']
  ],
]
```

## Solution
When persisting the selected domains/users in global state, we insert
another level to track region. Example:
```
[
  [
    'us-west-2',
    [
      [
        'arn:aws:iam:user/user1',
        ['domain1__pdx-1', 'domain1__pdx-2']
      ]
    ]
  ],
  [
    'us-east-1',
    [
      [
        'arn:aws:iam:user/user1',
        ['domain1__iad-1', 'domain1__iad-2']
      ]
    ]
  ]
]
```

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Newton Der <[email protected]>
aws-toolkit-automation and others added 23 commits August 7, 2025 17:13
**Description**

Added credential providers for DER, Project role credentials and
Connections credentials. Added in memory caching for now.

The credential providers currently are structured so that it can be used
with CredentialStore but a lot of things to do with credential store is
really old. In the coming days, while we do bug bashes and tests, if the
in memory caching fares well enough, will simplify the credential
provider to implement the AWS SDK CredentialProvider directly.


**Motivation**

Support auth for SMUS and ensure all clients get credentials and don't
fail due to lack of credentials.

**Testing Done**

Updated unit tests and tested flow locally. 

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Bhargava Varadharajan <[email protected]>
## Problem
SMUS users need Project Space management functionality

## Solution

- Add SageMakerUnifiedStudioSpaceNode for individual space
representation
- Add SageMakerUnifiedStudioSpacesParentNode for space container
management
- Add SagemakerSpace class for unified space operations and status
management
- Enhance SageMaker credential mapping with SMUS project support
- Add space-specific icons and detached server credential resolution
- Update SageMaker commands and model types for space functionality
- Added test cases.
---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.


###Note: Due to lot of constriants - I apologies that I had to raise
such a big PR.

Co-authored-by: guntamb <[email protected]>
…d Studio data explorer (aws#2183)

## Problem
Need to implement Lakehouse nodes and Redshift nodes for SageMaker
Unified Studio data explorer


## Solution
1. Implemented GlueClient and Lakehouse nodes
2. Retrieved all results from pagenation at once
3. Updated node icons and label based on UX requirements
4. Addressed open comments from previous PR:
aws/aws-toolkit-vscode-staging#2182
5. Added and updated unit tests

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <[email protected]>
__Description:__
Add 2 folder nodes under compute node to list Redshit and Spark
connections.
Add tooltip for the listed connections to show critical information.

## Appearance:
<img width="360" height="304" alt="image"
src="https://github.com/user-attachments/assets/4cb3ca4c-14d2-4373-af1d-35147238895b"
/>

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
## Problem

Newly created running Spaces do not have any controls (Stop/Connect)
BugBash: https://quip-amazon.com/c9u0AeXRbgx9/Local-IDE-Bug-Bash
## Solution

show the stop button when the remote connect status is undefined 

## Appearance
note: test3 is a newly created space with remote connect status ==
undefined

<img width="1085" height="418" alt="Screenshot 2025-08-14 at 11 23
19 AM"
src="https://github.com/user-attachments/assets/9b0d150b-2475-4b0e-b214-a37373e0edad"
/>

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
…d bug fixes (aws#2196)

## Problem
This PR addressing following problems:
1. Handle rendering s3 access grant node
2. Implement client store to create separate clients for different
connections
3. Fix rendering s3 table catalog in Lakehouse node
4. Wire connection credentials provider and bug fixes
5. Adapt connection credentials provider for private model clients
(sqlworkbench, gluecatalog)
6. UX: move all s3 nodes under "Buckets" folder

Rev 2:
1. Addressed comments
2. bug fixes

## Solution
1. Handle rendering s3 access grant node
`createS3AccessGrantNodes` in `sagemakerUnifiedStudioDataNode.ts` and
`s3Strategy.ts`

3. Implement client store to create separate clients for different
connections
`src/sagemakerunifiedstudio/shared/client/clientStore.ts`

4. Fix rendering s3 table catalog in Lakehouse node
`src/sagemakerunifiedstudio/explorer/nodes/lakehouseStrategy.ts`

5. Wire connection credentials provider and bug fixes
Involving all strategy files and client files

6. Adapt connection credentials provider for private model clients
(sqlworkbench, gluecatalog)
`src/sagemakerunifiedstudio/shared/client/credentialsAdapter.ts`

7. UX: move all s3 nodes under "Buckets" folder
`src/sagemakerunifiedstudio/explorer/nodes/s3Strategy.ts`

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <[email protected]>
…to Jupyter Notebooks (aws#2169)

## Problem

[feat(sagemakerunifiedstudio): Add Connection Magics Selector feature to
Jupyter
Notebooks](aws/aws-toolkit-vscode-staging@f0a4690):
- SageMaker Unified Studio CodeEditor users should have the ability to
easily select their SMUS connection/compute cell magics in the Jupyter
Notebook experience.
- The experience should be available when a SageMaker Unified Studio
space is connected either remotely or in the portal.

[feat(sagemakerunifiedstudio): Add resource metadata utils for SMUS
spaces](aws/aws-toolkit-vscode-staging@55a43ad):
- SageMaker Unified Studio depends on resource metadata present in the
SageMaker space for various functionality. This includes cases where the
space is either remotely connected or in the SMUS web portal.
- Depending features include the Connection Magics Selector and other
remote SageMaker Unified Studio features.
- SageMaker Unified Studio spaces store this resource metadata under the
`/opt/ml/metadata/resource-metadata.json` path. This resource metadata
file contains SageMaker and DataZone metadata associated with the space.

## Solution

[feat(sagemakerunifiedstudio): Add Connection Magics Selector feature to
Jupyter
Notebooks](aws/aws-toolkit-vscode-staging@f0a4690):
- Adding Connection Magics Selector feature for SageMaker Unified Studio
spaces.
- The Connection Magics Selector allows users to easily select their
SMUS connection/compute cell magics in the Jupyter Notebook experience.
- This is achieved by adding two new status bar items to each Jupyter
Notebook cell that when clicked show quick pick options for their SMUS
connections/computes. Once a user chooses a connection/compute, the cell
magics are updated accordingly.
- When applying the new cell magics, automatic language syntax
highlighting is also applied to the modified cell based on the
connection's associated language.

[feat(sagemakerunifiedstudio): Add resource metadata utils for SMUS
spaces](aws/aws-toolkit-vscode-staging@55a43ad):
- Adding a resource metadata helper module for SMUS spaces.
- Adding `getResourceMetadata()` and other methods that allow for easy
resource metadata retrieval for use by SMUS features.

## Screenshots

Jupyter Notebook view (w/ Connection and Compute selectors in bottom
right of notebook cells):

<img width="3840" height="1942" alt="Screenshot 2025-07-30 at 11-30-55
getting_started ipynb — src — SageMaker Code Editor"
src="https://github.com/user-attachments/assets/19d4f441-127a-4258-8b2e-0c24b7f40f7d"
/>


Connection Selector:

<img width="847" height="241" alt="Screenshot 2025-07-30 at 11 31 59 AM"
src="https://github.com/user-attachments/assets/93aedb12-12c1-4aaf-8629-99d74ac4cadd"
/>

Compute Selector:

<img width="986" height="251" alt="Screenshot 2025-07-30 at 11 32 38 AM"
src="https://github.com/user-attachments/assets/f91e1e46-285b-4db8-ad20-5a23b29a33c4"
/>

## Testing Done

[feat(sagemakerunifiedstudio): Add Connection Magics Selector feature to
Jupyter
Notebooks](aws/aws-toolkit-vscode-staging@f0a4690):
- WIP - will update

[feat(sagemakerunifiedstudio): Add resource metadata utils for SMUS
spaces](aws/aws-toolkit-vscode-staging@55a43ad):
- Added unit tests, new unit tests pass:
```
  resourceMetadataUtils
    getResourceMetadata()
      ✔ should return metadata when file exists and is valid JSON
      ✔ should return undefined when file does not exist
      ✔ should return undefined and log error when file contains invalid JSON
      ✔ should return undefined and log error when readFileText throws
      ✔ should cache metadata and not re-read file on subsequent calls
      ✔ should handle metadata with missing optional fields
      ✔ should handle metadata with empty AdditionalMetadata
      ✔ should handle empty JSON file
      ✔ should set initialized flag to true even when initialization fails
      ✔ should handle very large JSON files
      ✔ should handle JSON with unexpected additional fields
      ✔ should handle JSON with undefined values
      ✔ should handle concurrent calls to getResourceMetadata
    resetResourceMetadata()
      ✔ should reset cached metadata and allow re-initialization
    resourceMetadataFileExists()
      ✔ should return true when file exists
      ✔ should return false when file does not exist
      ✔ should return false and log error when fs.existsFile throws
```

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Boyu <[email protected]>
Co-authored-by: invictus <[email protected]>
…cenarios (aws#2200)

## Problem
SageMaker Unified Studio explorer failed to handle scenarios when no
projects or spaces are available, causing poor user experience and
potential errors.

## Solution
- Enhanced DataZone client error handling for missing resources
- Added proper handling for empty project and space lists in explorer
nodes
- Improved error messages and fallback behavior in SageMaker space
integration
- Updated utility functions to gracefully handle null/undefined
scenarios
- Should fix the Space tooltip not to include the userId and SM
domainId, and fixes the the scenario of after sign out with project
already selected - If we sign in again with different domain, project
from other domain is still shows up. Thanks to Bhargava for the fix.
- Added/Updated the test cases accordingly

---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

Co-authored-by: guntamb <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
…, improve error and empty state handling (aws#2202)

## Problem
1. To be consistent with SMUS data explorer, we should show catalogs
under Redshift nodes as well
2. Need to address UX feedback on error handling and empty state

## Solution
1. Following the implementation in SMUS data explorer, also show
catalogs under Redshift nodes
2. Addressed UX feedback: 1. icon size for table icon. 2. Error node and
empty node

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <[email protected]>
…ion for SMUS (aws#2204)

## Problem
Need to handle experience in remote ssh connection for SMUS

## Solution
1. Read metadata from /opt/ml/metadata/resource-metadata.json
2. Read DER from cred profile
3. Pre-populate Root node and project node, only show data nodes under
them

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <[email protected]>
…selection (aws#2205)

## Problem:
Project selection had poor error handling and automatically invoked
after sign-in causing some unintended UX issues.

## Solution:
- Add access denied error handling with user-friendly messages
- Remove automatic project selection after sign-in
- Refactor selection logic with helper functions for better error
management
- Updated the test cases.

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

Co-authored-by: guntamb <[email protected]>
**Description**

Reduced the DER cred expiry time to 10 min default. The API is being
updated as well.

Also updated the auth logic to invoke project picker on sign in,
re-auth.

**Testing Done**

Unit tests, tested manually on VSCode as well - The signin, re-auth and
sign-out cases.

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

Co-authored-by: Bhargava Varadharajan <[email protected]>
…s project, start/stop space and data explorer (aws#2207)

## Problem
Telemetry is missing from the feature.

## Solution

- update packages/core/src/shared/telemetry/vscodeTelemetry.json with
new types, metrics, and metadata
- run npm run generateTelemetry in core package. this will create
required obj that are accessible via telemetry.{metric name}
- then emit metric in the code

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Keyvan Zare Rami <[email protected]>
Co-authored-by: Zulin Liu <[email protected]>
…ccount cases (aws#2209)

## Problem
1. In a cross region cross account set up. seeing error fetching space
2. The error message when cannot connect is not meaningful. I had to
check on telemetry log to see the error message

## Solution
Fixed the above issue


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <[email protected]>
## Problem
Consistently reproducing a similar issue when attempting to
start/connect to a Stopped Space when remote access is initially
disabled. The Space is updated, started, and even connected to, but the
Space does not show the Connect button anymore, until the Project is
refreshed. This suggests the Space metadata is stale after the
UpdateSpace call.

## Solution
Tried to simply replace the spaceApp variable with the updated one got
from describeSpace API call, but find conflicts on variable definitions.
so update the variable names and update only remoteAccess variable to
minimize impact.

ListSpaces(original)

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sagemaker/command/ListSpacesCommand/

<img width="2556" height="1308" alt="Screenshot 2025-09-01 at 4 11
09 PM"
src="https://github.com/user-attachments/assets/64b4439e-4495-4822-9a56-c61470e269c6"
/>

DescribeSpace(updated)

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sagemaker/Interface/DescribeSpaceCommandOutput/
<img width="2523" height="1299" alt="Screenshot 2025-09-01 at 5 02
24 PM"
src="https://github.com/user-attachments/assets/37860497-8116-4d16-bc08-2562d0ea25bd"
/>

- pass SpaceSettingsSummary -> SpaceSettings in spaceApp type parameter 

- update remote access 
## Test 

manually debug and unit test

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

Co-authored-by: Laxman Reddy <[email protected]>
## Problem
* SMUS users are missing the Call To Action of remotely connecting to
the spaces in ToolKit.
* Users that are added as project members via Groups were not able to
access project in toolkit.

## Solution
- Expand SageMaker Unified Studio project and compute nodes by default
to improve user experience and discoverability.
- Add description and tooltip for spaces to indicate call to action for
remote connect
- Updated test cases.
- Change project access visibility logic to now require ProjectCreds
access before
displaying compute and data nodes. Projects now only show full details
when user has appropriate ProjectCreds permissions. We moved away from
the ProjectAccess calls as the user could be in groups too and we don't
have a straight path to get groups assignments.
- Added isSMUS check for user activity monitoring

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: guntamb <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
**Description**

Added a proactive cred check and refresh when SSH connections
are established.

Also updated the error messages to be actionable for users.

**Motivation**

Bug : Previously once cred expired, we were throwing blanket
error which did not tell user what the issue was and there
was no path to recovery as well. Now with proactive cred refresh,
user should be able to retry in ~10-15 seconds.

**Testing Done**

Tested all flows manually. Unit tests partial, needs to be updated.
* SMUS needs to be activated in NodeJS environment only.
* Remove Notebook resources
* Added changelog
@amazon-inspector-ohio
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-ohio
Copy link

🔴 I'm not able to complete the code review because the diff size exceeds the limits. Consider splitting your changes into smaller diffs and try again. For more information, see Diff limits in the GitHub documentation

Request ID : 0d8509a9-e885-49c3-8f3f-434e96fdddcd

@Will-ShaoHua
Copy link
Contributor Author

/retryBuilds

@rli rli closed this pull request by merging all changes into aws:master in bfee0a9 Sep 8, 2025
@Will-ShaoHua Will-ShaoHua deleted the smus branch September 8, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.