StrataNotebook

A StrataBI Platform Module

Powered by Shaleio

Tier: Premium MX · module id stratanotebook · type multi_page_app (an app StrataBI renders from its own pages) · requires StrataBI · stands alone

Note
In development: StrataNotebook is not yet available to order. This page describes it as it is being built. See In development for what else we are working on.

StrataNotebook manages SageMaker Studio JupyterLab environments from inside StrataBI: provision now or on a schedule, open with short-lived launch links, auto-stop compute at a server-side deadline, and keep notebook storage between sessions. Everything runs in your account, in SageMaker domains you approve.

What you get

TabPurpose
Active EnvironmentsYour workspaces and live SageMaker apps (managed vs external/read-only). Pick a workspace and an action — Open, Start, Stop, Extend, Teardown — then press ▷ on Result.
ProvisionA Setup check showing what this install can provision, then domain, user profile, instance type and session length; press ▷ on Provisioning.
SchedulesFuture and recurring provisioning via EventBridge Scheduler; pause, resume, delete.
HistoryProvisioning, access issuance (never the URLs), starts, stops, extensions, teardowns.

Actions run only when you press ▷ — changing a dropdown never triggers one. Open returns a one-time launch link straight to your browser; it is never stored (requires StrataBI core 1.7.14+). Active Environments shows each workspace's profile, instance type, the state SageMaker reports, when compute stops and the time left, and a visible error if a scheduled stop failed.

About AWS access. Users don't get an AWS Console login, but code in a notebook runs as the SageMaker profile's execution role and can use that role's AWS permissions. Your organization creates and scopes that role; StrataNotebook never creates or widens one, and refuses to work with a profile whose role isn't on approved_execution_roles.

Install and update

bash
stratactl install stratanotebook
stratactl update  stratanotebook --to <version>
stratactl uninstall stratanotebook

Set up a SageMaker domain

StrataNotebook works inside an existing SageMaker Studio domain. Until one is approved, the Provision page's Setup tile explains what's missing.

bash
# 1. find (or create) a domain and a user profile
aws sagemaker list-domains --query 'Domains[].[DomainId,DomainName,Status]' --output table
aws sagemaker create-user-profile --domain-id d-xxxxxxxxxxxx --user-profile-name analyst

# 2. approve them for StrataNotebook (stored settings), then update
B=s3://<strataci-bucket>/config/stratanotebook.auto.tfvars.json
aws s3 cp $B nb.json || echo '{}' > nb.json
#    set "approved_domains": "d-xxxxxxxxxxxx", "approved_user_profiles": "analyst",
#        "approved_execution_roles": "arn:aws:iam::<acct>:role/<your-notebook-role>"
aws s3 cp nb.json $B
stratactl update stratanotebook

The update grants StrataNotebook's SageMaker permissions scoped to the approved domains only. Creating a domain needs a VPC, subnets and an execution role (the AmazonSageMakerFullAccess managed policy is the usual starting point); the domain itself costs little, and you pay for storage and for instances while they run.

Execution role trust policy. SageMaker must be allowed to assume the role and set a source identity on it (Studio tags each session with the user profile). With only sts:AssumeRole, starting JupyterLab fails with "SageMaker was unable to assume the role … to sts:SetSourceIdentity":

json
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Principal": { "Service": "sagemaker.amazonaws.com" },
    "Action": ["sts:AssumeRole", "sts:SetSourceIdentity"]
  }]
}

Settings

SettingDefaultMeaning
sagemaker_domain_ids → approved_domains— (required to provision)Existing domain ids, comma-separated.
approved_user_profilesany profile in the domainAllowed user profiles.
allowed_instance_typesml.t3.medium,ml.m5.largeInstance types offered.
default_session_minutes / max_session_minutes240 / 480Session length; compute auto-stops at the deadline.
max_active_per_user / max_active_total2 / 10Concurrency limits.
default_storage_gb / max_storage_gb20 / 100Space storage.
approved_execution_roles— (required)Customer-owned SageMaker execution role ARNs. A profile running as any other role is refused.
user_profile_map—Which StrataBI users may use which profiles: `dave@x.com=dave;alex@x.com=alex\analyst`. Blank = any approved profile.
owner_modeactorWho owns a workspace: the signed-in StrataBI user (per browser session when StrataBI has no auth), session, or event.
alarm_topic_arn—SNS topic for the stop/provision failure alarms.
allow_space_deletionfalseAllow permanently deleting a space (destroys its storage). Normal teardown keeps storage.

AWS services

Everything below runs in your AWS account. It is created by the install unless noted.

ServiceUsed forRequired
Amazon SageMaker (Studio)Spaces + JupyterLab app lifecycle in approved existing domains. StrataNotebook never creates or deletes domains.Yes
Amazon DynamoDBWorkspaces, leases, schedules, operations, run history.Yes
AWS LambdaRouter, provisioner, managers, access, teardown, reconciler, history.Yes
Amazon EventBridge SchedulerScheduled provisioning + per-session shutdown deadline.Yes
Amazon SQSScheduler target DLQ.Yes
Amazon S3Transient tile result artifacts (no-store).Yes
AWS IAMOne scoped role per function; reviewable independently by Enterprise IT.Yes
Amazon CloudWatch LogsRuntime logs.Yes

It also uses pieces of your existing StrataBI install: the system S3 bucket, the module registry (DynamoDB) and, for tile results, the <name_prefix>-status-writer Lambda.

How it works

LambdaDoes
api_handlerFront door for the page tiles: option lists, the Setup check, and actions.
workspace_provisionerCreates the space and starts JupyterLab (the only role with CreateSpace/CreateApp).
workspace_manager / inventory_managerThe Active Environments view and live inventory (read-only).
schedule_managerSchedules view and EventBridge schedule management.
access_managerMints short-lived presigned launch URLs (the only role with CreatePresignedDomainUrl).
teardown_manager / lease_reconcilerStop compute at the deadline; a periodic sweep catches anything missed.
history_managerThe History view.

Page tiles are synchronous, so views and actions render as soon as the Lambda answers; the heavy SageMaker work is handed to workspace_provisioner in the background.

Troubleshooting

Modules · StrataCTL