Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cross-account runbook + actions #4802

Open
wants to merge 1 commit into
base: default
Choose a base branch
from
Open

Conversation

svia3
Copy link
Contributor

@svia3 svia3 commented Dec 20, 2024

Issue #, if available:

Description of changes:

  • Add x-account instructions + runbook for walkthrough of setup + script actions.
  • Add tagging fix for UI by adding env. id to tagged SM execution role, remove dz proj/domain from tagged DZ domain
  • add helper to toggle between child/parent clients

Testing done:
Manually using hulk test accounts

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have verified that my PR does not contain any new notebook/s which demonstrate a SageMaker functionality already showcased by another existing notebook in the repository
  • I have read the CONTRIBUTING doc and adhered to the guidelines regarding folder placement, notebook naming convention and example notebook best practices
  • I have updated the necessary documentation, including the README of the appropriate folder as well as the index.rst file
  • I have tested my notebook(s) and ensured it runs end-to-end
  • I have linted my notebook(s) and code using python3 -m black -l 100 {path}/{notebook-name}.ipynb

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danabens danabens self-requested a review January 7, 2025 20:36
decision = input("Need to import SM profiles from a X-account? [y/n]: ")
if decision == "y":
x_account_role = input(
"X-account role ARN to assume? This would be the account that originally created"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"X-account" -> terminology that customers would understand better. i.e.
"Need to import SageMaker profiles from a different account?"
"Secondary account role ARN to assume"

what account is this asking for exactly? the DataZone Domain account or the SageMaker Domain account? i.e. above line mentions "SM profiles" but below mentions "DataZone domain"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also avoid abbreviating SageMaker as SM to avoid potential user confusion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. Will clean this up.

Comment on lines 432 to 437
self.dz_client = session.client(
"datazone", region_name=region, endpoint_url=dz_endpoint_url
)
self.byod_client = session.client(
"datazone-byod", region_name=region, endpoint_url=dz_endpoint_url
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear where these are used - looks like this is overwriting the clients - do we need both? (clients for DZ domain account and SM domain account)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. These override the existing clients because we need to assume a new role/session. I think we can extend these with a new var so that the original WF isnt touched.

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.

2 participants